|
Title: update for isValid extension for EasyUI 1.7.x Post by: 2plus2 on May 03, 2019, 06:16:24 PM Howdy...
With the update of our site from 1.3 to 1.7 we've had to update our custom extension, like the isValid for the Combobox. To belabor the point, we sometime deactivate drop down values and on the default load & set the available drop down options do not have a value for the value stored in the DB. So we need to check to see if the value exist, and if not reload the drop down options with the "missing" value and set that as selected (plus warn the user that they need to select a new value. This way we can show the user the previous value and give them something to work with. With the update to 1.7, we need to change the find option slightly due to changes in the names of the css classes. This is what I came up with, and I would like a quick yes/no on my update - basically did I select the correct css name that will help us down the road. Code:
Updates / corrections to my changes are welcome. Title: Re: update for isValid extension for EasyUI 1.7.x Post by: stworthy on May 03, 2019, 06:34:21 PM In version 1.3.x, the combo extends from validatebox. In version 1.7.x, the combo extends from textbox and the textbox extends from validatebox. The 'isValid' has been defined in the textbox component so the 'isValid' method is removed from $.fn.combo.methods. If you want to override it, try this code instead.
Code: isValid: function(jq){Title: Re: update for isValid extension for EasyUI 1.7.x Post by: 2plus2 on May 04, 2019, 12:08:39 PM Ok - thanks!
I don't remember why we overrode the isValid method before, but we'll try the default option. And nice to know we have a fall back if needed. Much appreciated as always. |