-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Allow duplicate values in an input #129
Comments
Version 0.8 will allow this - if I understand your issue correctly - have a look at issue #76 |
Not quite. Say I have an |
Any news on this? |
Try last version. |
@FoboCasteR am I needing to use any new settings? It's not working by default. |
#76 - Here I used standalone version. Works fine with default settings. |
No. This wasn't what I meant. My problem doesn't involve optgroups. I just need to be able to select the same value more than once. |
+1 @jbrooksuk did you ever find a solution to this? |
@ohaibbq, I'm afraid I never did. |
i think this issue may need to have some modification to the selectize.js file steps(with selectize v0.8.5): 1:make the selected items can be duplicate when “create” line:2502 note here i add a new option in settings named “enableCreateDuplicate” to switch this feature 2:sign as an user-create item in the createItem function 3:add the new options where init selectize now it should can accept duplicate values when create. |
EDITED (my bad coding the night huehue) so. So, I got the same problem than @jbrooksuk and solved it. Just to be sure we are speaking about the same thing this code is to made possible to add the same searched value (so duplicated). I think some people here didn't understood @jbrooksuk request. Hope is that you were looking for, I didn't wrote all of this for nothing xD So code (I'll give my lines, but maybe it's different, don't care, just search the same thing). LINE 1686 in the addItem function scope replace the if(self.items.indexOf(value) !== -1) by Now, after a long search inside the code (ok I just see it in the doc/usage, but looked before xD), there is an option to let the values already used. With this option and the new enableDuplicate, you will see them in the list, and will be able to add them again. Done that's all. Maybe pushing it in the next release ? It's not heavy and very usefull in my opinion. |
@Inateno that's exactly what I want. |
@Inateno nice solution~! |
Same use case here as @jbrooksuk ( @jbrooksuk: did you get the hacks outlined above to work for you?). Judging by looking at the code as of 0.8.5 I can see changes that hint me towards there being an option Now I am confused whether this is already resolved and this issue to be closed as of 0.8.5 or not? How would I have to go about multiple values, as in @Inateno's example? |
@brianreavis have you had any thoughts about this? |
I've made a PR that fixes this. |
will it be merged in master branch? |
What's the status about that? |
Use this version: https://github.com/BlueBayTravel/selectize.js It works like a charm, in option give Boolean for: duplicates: true/false Hope this helps! From: Jure [mailto:notifications@github.com] What's the status about that? — |
@Anxy you'll need to use the right branch; https://github.com/BlueBayTravel/selectize.js/tree/allow-duplicates |
Ah, we really need this feature too. It looks like a small fix. Why isn't added in the main release? It's very useful! |
Is there any other library that allows this? |
+1 for this functionality. This is really desired enhancement. |
I would be interested in this functionality, too (and using the "official" version) |
Same here, this really should be included. |
Since the above branch has been removed, is there a current solution for this? |
Why has the branch been removed? |
https://github.com/konradb90/selectize.js/blob/allow-duplicates/dist/js/standalone/selectize.js Based on selectize.js (v0.8.5) |
In my countries.sql, I have 246 countries but only 227 international phone code numbers. This means I can't use selectize for choosing country codes. |
closing stale issues older than one year. |
Sorry, but why is this closed? Such a long discussion with including samples, proposed fixes and so on. What's the reason of closing it without actually doing it? |
With the project being unmaintained for such a long time, our current focus is regaining a fair baseline and assessing items based on activity. The only fair way of doing this is by bulk closing items without any major activity and re-opening on request. (side note, this shouldn't have been caught in that filter; sorry) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
This issue still need a fix |
It would be great to have the duplicate values capacity added or resolved. Great software, thank you! |
+1 |
|
The solution links provided are broken, and proposed code changes are not working for me. I had worked on this issue before and come out with attached solution based on latest code base (v0.12.6). The change introduces a new setting: allowDuplicateSelection. |
This issue is still unresolved in 0.14.0. |
+1 here too, thanks |
abandoned +1 |
@ymeric Please help me. when deleting is deleting all duplicate values. Desired: delete only specified value |
I updated the code in |
please fix this |
Is it possible to have an
input
element which allows duplicate values? The reason is, I'm trying to build a form which allows people to enter ages of children, which can of course, be the same; twins, triplets etc.The text was updated successfully, but these errors were encountered: