-
-
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
#270 Selectize Modifications For Pasting Delimited Values #425
Conversation
Forgot to mention that this could help with the Open Issue #270 |
Thanks for the pull request. I'm not sure if the maintainers are expecting submissions for generated/build files. I don't own the project but it seems like it would make the merge/acceptance process easier. |
Actually the owner does request you exclude the generated files in pull requests in the readme |
I really like where this is going, @jhash. I think having if (!self.options.splitOn) {
var delimiter_escaped = self.options.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
self.options.splitOn = new RegExp('\s*' + delimiter_escaped + '+\s*');
} Also, the |
Conflicts: src/selectize.js
@brianreavis Thanks for the suggestions! Sorry I haven't been actively watching this pull request, I should have noticed this a while ago. Anyways, I'm not sure why I left that $.proxy in there, but it's out now. Also, I added the splitOn changes that you suggested and fixed the merge conflicts. Hope to see it go live and thanks again. |
Thank you for this @jhash . This pull request works perfectly. |
@brianreavis Thanks for building such a great component. Any thoughts on merging this in and releasing? |
Thank you @jhash , @brianreavis could you please review this? Thank you! |
#270 Selectize Modifications For Pasting Delimited Values
@jhash Sorry for the delays in getting to this. I'm going to make a few minor changes, but all in all it looks really great. Thanks! |
This is now a part of 0.12.0 (just released) |
love this feature |
@@ -2,6 +2,7 @@ Selectize.count = 0; | |||
Selectize.defaults = { | |||
plugins: [], | |||
delimiter: ',', | |||
splitOn: null, // Regex or string for splitting up values from a paste command |
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.
Is this option missing from documentation? I couldn't find it
Simple fix for adding paste support where values are delimited by whatever regex or characters desired - does not interfere with existing delimiter functionality at all.