-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Documentation is very unclear about how to add options #745
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
Comments
I second this one. I had to google for an example on Stack Overflow. I had similar issues with other functions in the documentation, such as "setValue(value, silent) Resets the selected items to the given value." - it never specifies that a 'value' is actually the 'value' part of an option pair. Perhaps it could have a section where it defines all these things. |
Open to pull requests. |
Hey, why was this closed? What's the resolution on this? |
Because an issue is not the solution to something so trivial – this is what pull requests are for. I'm in agreement that it could be improved, and am open to fixes... I just don't have time currently to do it myself and am not open to more actionless +1's. Related: #752. |
I agree on both fronts: documentation could be improved, I stumbled upon some sketchy descriptions here and there (and I felt into the trap described above, like many people I guess); and it is the work of contributors to improve it, I think. At least, that's why I forked the project... |
- Some typo fixes - Fixes selectize#779, selectize#745, selectize#464 and perhaps some others
Closes selectize#785 [skip-ci] - Some typo fixes - Fixes selectize#779, selectize#745, selectize#464 and perhaps some others (Markdown doesn't work inside tables :-( )
For anyone else that comes across this like me, there is now excellent documentation for Selectize API here: https://github.com/selectize/selectize.js/blob/master/docs/api.md |
$('#id').selectize({ |
All the documentation says is:
Naturally, I thought this would be sufficient:
However, it turns out I have to do this:
I was only able to figure this out by looking at the definition of "create" in the example on the home page. The documentation should be clearer about the schema of options.
Also, I don't see why it shouldn't accept
['cat','dog','snake']
or even'cat,dog,snake'
with a little introspection, considering it allows things like this in the value field of a text input.The text was updated successfully, but these errors were encountered: