Closed EmeraldWeb closed 3 months ago
I just ran into a bug in the Webform module for Drupal related to <option>
tags being removed and re-added.
The bug was related to trying to cache an option element via jQuery (see below) and then having this option element being removed by ChoicesJS.
var $otherOption = $element.find('option[value="_other_"]');
This is not a major issue and easy to work-around but I felt it was worth noting here.
I also likes the lib, but turns out i can't use this plugin because the choices.js doesn't preserve the select options , so i can't attach html5 data to the option and use it for another js function. sadly i have to go back to select2 since it does preserve the options.
I hope this will implemented in next version. Ideally choices.js is the interface to a hidden select, but it does not modify the original select tag just like select2.
Happy to review a PR that resolves this 👍
Is there some update? I'm using version 9.0.1 and the issue still remains.
Still in 10.2 :( I don't understand why something like this was a feature in the first place?
Implemented as part of v11.0.0
I really like this library, but there is one unpleasant thing for me - clearing the
<option>
as a result of the library. What prevents future improvements and maintenance through cross-functional scripts. I don’t know why you don’t save the original tag tree inside<select>
, if this is necessary, then please add a parameter to preserve the original data structure.