You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that selectmenu doesn't work correctly when it's included on a dialog. It seems that selectmenu needs special treatment. A simple "refresh" won't work, apparently it needs destroyed and re-created when the dialog is shown, or else either it shows the dropdown behind the dialog, or it throws an error.
So, I've added an additional parameter to the selectmenu, called "recreateOn". This can be set to a ko observable, which when changed will cause the selectmenu to be destroyed and recreated. In my setup I update this observable when the dialog is opened.
Hi!
I've noticed that selectmenu doesn't work correctly when it's included on a dialog. It seems that selectmenu needs special treatment. A simple "refresh" won't work, apparently it needs destroyed and re-created when the dialog is shown, or else either it shows the dropdown behind the dialog, or it throws an error.
So, I've added an additional parameter to the selectmenu, called "recreateOn". This can be set to a ko observable, which when changed will cause the selectmenu to be destroyed and recreated. In my setup I update this observable when the dialog is opened.
eg:
selectmenu: { width: 200, refreshOn: $data.CMIHeaderFormID.options, recreateOn: $data.dialogFullyOpen }
This is then added to the Selectmenu.prototype.update function as such:
Might be a bit hacky, but seems to work!
The text was updated successfully, but these errors were encountered: