This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Couple of issues and suggestions #21
Comments
Thanks for the suggestions and the bug reports, they help greatly. I'm currently rewriting a lot of the library to fix other issues so I can easily fix the bugs and implement the options you've listed at the same time. |
This was referenced Jun 14, 2017
Closed
Mobius1
pushed a commit
that referenced
this issue
Jun 15, 2017
… , closes #22 , closes #23 , closes #24 , closes #25 * Empty select elements can now be used ([#23](#23)) * Improved IE9 compatibility (removed pointer-events usage) * Allow the use of native dropdown * Native select is now triggered on mobile devices (single and multiple) ([#14](#14), [#19](#19), [#25](#25)) * Pagination can be applied to options already defined in the DOM (previously only possible with the `data` option) * Searching with pagination active will now return results from entire set instead of the loaded set ([#15](#15)) * Custom renderers (`renderOption`, `renderSelection`) can now be used along with the `data` option. * The tag input placeholder can now be customised ([#21](#21), [#22](#22)) * Reduced memory usaged * Various other fixes
+1 Not having an |
Mobius1
pushed a commit
that referenced
this issue
Sep 16, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We had some several issues with this select.
Empty select throws error - I saw that there will be fix in next release
Selectr prevents select to set its default value - By default select sets its default value from first option child, therefore select has some valid value. But Selectr prevents this and instead of "some value" select has value of NULL which is a big problem in our occasion because our validation service doesnt allow NULL as valid value. So we added an option with value of "" ............ troubles continues in next point......
Empty option breaks script - If you add option with no value, Selectr throws error. See code below.
<select id="test"> <option value=""></option> <option value="yolo">John Doe</option> </select>
(option.nodeName !== "OPTION" || !option.value)
to(option.nodeName !== "OPTION" && !option.value)
Selectr doesn't emit "onchange" event for select - It would be nice if Selectr could provide this by default. In case that somebody will need this, see code below
element.on('selectr.select', function(option) { let sel = option.parentNode; if ("createEvent" in document) { let evt = document.createEvent("HTMLEvents"); evt.initEvent("change", true, true); sel.dispatchEvent(evt); } else { sel.fireEvent("onchange"); } });
Enter new tag input placeholder - It would be nice if we could change "Enter a tag..." placeholder for this input directly in Selectr options. If there is such option in Selectr already, then sorry, I didn't saw that :)
Those first 3 points made us suffer so badly, it took us 1 and a half day to figure everything out :D
But no hate sir! I think this library is great!
Thank you for your effort, time and MIT license :)
The text was updated successfully, but these errors were encountered: