Opened 4 years ago

Last modified 4 years ago

#15351 new bug

Can't create selectmenu dynamically

Reported by: AlfonsoSerra Owned by:
Priority: minor Milestone: none
Component: ui.selectmenu Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Ryan J Ollos)

Consider the example in which we create a selectmenu from javascript:

<script type="text/javascript">

var selhtml = `<select id="sel1">
   <option value="1">Apples</option>
   <option value="2">Orange</option>
   <option value="3">Peach</option>

var sel = $(selhtml)
var parent = $("div#mysel")
// or
// sel.selectmenu({appendTo: parent}) 

This does not work. It wont throw the selectmenu into the dom. This is a problem when a selectmenu is part of a larger javascript component. On this case the parent node may not even exists but we should be able to create the menu in order to attach it at a later point, when the parent is created.

Change History (1)

comment:1 Changed 4 years ago by Ryan J Ollos

Description: modified (diff)
Summary: cant create selectmenu dinamicallyCan't create selectmenu dynamically
Note: See TracTickets for help on using tickets.