Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Dynamic Select empty when opening second time. #5935
When opening select(dromdown) for secod time, the list is empy. This happens only if the list does not fit on the screen:
You wil see that big dropdown is empty when opening second time.
I strongly recommend to always bind to
As @vstars pointed out, the problem here is indeed the selectmenu dialog page that remains in the DOM, only the list is removed from the dialog.
The dialog that is created gets the same ID as your select with the "-dialog" suffix. You create a new select with the same ID each time the button on the homepage is clicked. The framework doesn't create a new dialog a second time because there is already a dialog with that ID. If you don't give the select an ID, the dialog gets a random ID
However, this way you can end up with many dialogs in the DOM which is not good. So a better workaround is to remove the dialog with custom code. See: http://jsbin.com/owasir/29/edit