I know that the dropdownlist in dojo has been depreciated.
In flex, once a dropdownlist was clicked on, code could check if certain criteria were met and if not, the value of the list would not change.
I am trying to implement similar functionality with dojo/select however, the absence of the "break" to exit a function in dojo, makes this more complex.
In dojo, once you click on the select list. it allows the user to change its value.
A solution is to store the current value of the select list, and if criteria are not met, then revert the select list to its original value.
Any other more simple solutions?
Thanks.
Solved! Go to Solution.
Lefteris,
OK in that case then here is a updated fiddle that shows that.
Lefteris,
Here is a fiddle that demos how to check the selects value and prevent it from being selected if it meets a certain value:
Thank you Robert.
I have to work with it. I actually try to compare the values of two select objects to ensure that no identical values are selected. Both select objects carry the same options.
Lefteris,
OK in that case then here is a updated fiddle that shows that.
Thank you!
I am using this approach to create custom repopulating dropdowns in my Query widget. When the watch handler is triggered, a new paramsDijit is built using this.paramsDijit.build().
Everything is working fine, but I'm unable to figure out how to add the watch handler to the new paramsDijit after it is added to DOM. Also, will the watch handler be removed from the destroyed dropdown elements?
I'd be grateful if anyone could point me in the right direction.
Mihkel,
The watch would have to applied to the select element inside your paramsDijit. As far as the watch being removed when the select element is destroyed, I think so.