-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for adding user created items to select boxes #856
Conversation
There is one missing part: the uniqueText doesn't show up with select boxes, but the creation is correctly prevented |
unique message for multi-select boxes is now fixed |
72ca731
to
327faff
Compare
Choice and Change events do not fire when new item is created and selected. Also, if using placeholder and single-select some times when the new item is selected, placeholder is shown |
Can you tell me, which events are affected?
This would help me, fixing
the error.
Anyway: if somebody needs this feature urgent, he can add in
package.json:
...
"choices.js": "devkral/Choices#feature/add_select_options"
...
|
atm I have tested change and choice events on a single-select type |
How do I initialize this? It doesnt work when I pass "addItems:true" to the choices object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you merge this PR please? We already been using this since months, and its working fine for us. :)
Hello @devkral , I'm trying your solution. How can I deactivate the |
I hope this feature will be merged in a short time 🙏 |
+1 For merging this feature if we can help with anything let us know @mtriff |
Why this thing isn't merged yet? 🤔 |
any updates?? this feature is needed |
I switched to react mui and were busy, so there were no updates. I think I try to rebase but I am out of the code for years. |
…ke disabled items, highlighting
add test for disabled choices getter
…ms controls if user can add choices/items
327faff
to
774eee1
Compare
@devkral I am new to this but I used your pull request file via the zip and it works fine. But I found some issues.
|
@devkral this feature would be essential for the library to remain competitive with other options like tagify, do you think you would be able to merge it? |
I have no permission to merge. What would you need to merge? |
Anyway the PR is so old, that the project for which I required the PR is dead. Therefor I didn't developed the patch further but if you can tell me what you need I will try to find some time |
Thank you very much @devkral it would be basically to have the possibility to add new choices dynamically throuhg the text box. I am not sure why that feature is still not implemented in choices-js, who is the main maintainer? |
Thanks! I've implemented a variant of this in #1166 I'll likely copy out the tests to help verify the feature |
Most of these tests should be part of #1166 |
Fixes #39
This PR adds support for adding user created items to select boxes.
It reuses the addItems Flag for streamlining its behaviour for all supported elements (text, select, multi-select).
I would consider it as a breaking change for select boxes (fixable with addItems: false).