Selectize is the hybrid of a textbox and <select> box. It's jQuery based, and it has autocomplete and native-feeling keyboard navigation; useful for tagging, contact lists, etc.
In our grid layout we give elements span* classes, similar to that of Bootstrap. Our original select element includes one of these so that we can create a nice and neat form layout.
When you apply Selectize however to the elements, the new element doesn't include any classes or original markup. Similar to the problem in #13.
Currently onChange only returns the value of the selected item. It'd be much more useful if it returned say, the object that is used to display the item, similar to how render.item works.
If I 'click' on the select area, it highlights itself briefly (as if Safari was going to give control to it) but then nothing happens.
COMMENTS:
After going through the rest of the demos on that same page, it seems like Selectize works fine as long as no text is being entered - i.e., any of the demos where it's just acting as a normal select are okay.
Perhaps this is expected, but I figured I'd mention it just to be safe.
If the original element is required, Selectize will correctly copy the property. If the user doesn't fill in the field and tries to submit the form, then the browser will try to focus the field to alert the user to their error.
Selectize doesn't seem to respond to this, resulting in a console error of An invalid form control with name='input_name' is not focusable.
It seems that the browser (at least Chrome) won't (correctly) send focus to hidden elements, so really Selectize needs to remove the required property from hidden fields and respond to a focus event.
I'm unable to interact (drag) the scrollbar on Chrome, Safari and Firefox on my Mac (haven't been able to test other browsers yet) .. The list closes as I try to click down on the scrollbar. I suspect it's an erroneously delegated eventhandler :)
Hope this hasn't been brought up already, I did scan for something similar.
First our setup. We have an input box which we then apply Selectize.js to. Next to the input is a dropdown which effectively changes what type data we send in the load function. Also, we have an object containing several bits of information to control what data we send and what the templates are depending on the search type.
After typing a search query the callback is sent, but the data doesn't load, until you backspace everything in the input. The output of your results will then be listed.
hello..
i'm a student, i'm in an internship periode and got job to develop a website.
i want to make a chained select like city-state. i use multi dimentional array from json encode to store category(id category, name) and type(id category, id type, name). if the category change, the type will change too, refer to which category selected.
can you teach me the simple javascript for steps of using onChange? i do this for few days, and still failed.
Can you think of any way of changing this dynamically based on theme or on initialization? I tried doing a top: 10px !important; but that breaks down if you have more selected than fits on one line.
I think the option component should reflect exactly how the original option was (including the label) so the user can query the select component and get the label and wherever data he wants from it.
A destroy method to complete remove Selectize from an element would be nifty. I'm currently cloning a div which contains three inputs, one of which is Selectized and although I'm cloning with both options of .clone as false, Selectized gets copied too.
When selectize applied to a select input, and a selection is made (with the keyboard or mouse,) the focus is lost. This makes it a pain to tab around the form, as after you select something the focus is set to the body element. Compare this with a native select input that keeps focus on the input after it has closed.
I've hacked together a bit of code that returns the focus to the input element, however it's not great. Perhaps the best way would be to insert an invisible element to take the focus after an item is selected?
so this is a minor feature request, I would like to have the option to change the string appears when user add a new attribute the is not in the list.
I already done this on my setup, since it's just adding (this.settings.new_string || 'Create ') where the 'Create ' is hardcoded and then give the selectize function 'new_string'
When I click an item to select it from the select dropdown, the item gets shown as selected, however the menu does not go away. It initially does, but pops back up right away. This can be seen with IE9 when going to the main example page: http://brianreavis.github.io/selectize.js/
I have an issue with the events not getting fired when the element is in a modal. Everything is created as it should but clicking on it and typing does nothing.
The value of the select element does not post to server on ajax post.
This error cause by calling function clear() in Selectize.prototype.addItem(). In clear() we call updateOriginalInput() with data = "" and then the input (select) is trigger change with val = "" so the value "" is posted to server.
When user change option in select, the change is envent is triggered twice (in clear() and addItem()).
Using a remote source is great and all, but some times that data may never change, or won't for a long time. How about an option to locally cache the returned data into Local Storage if it's available and use that source rather than fetching data all of the time.
Currently Selectize doesn't preload any data, so when you're using a remote source and call addItem before you've manually typed anything, nothing will happen as the data hasn't loaded yet.
Obviously it'd be better to give this its own option, so you can decide if you want to preload anything or nothing.
in the function debounce_events where in line 77 of selectize.js / src / utils.js
there is no business of the 2nd param types, it unuse here, but it made me thought it does.