Use 'Selectize' with multiselect array with emuns
See original GitHub issueIs it possible to use Selectize with array with predefined values (enum), something like this:
tags: {
type: "array",
format: "select",
uniqueItems: true,
items: {
type: "string",
enum: ["bold","italic","smallcaps"]
}
},
Using code above with Selectize, json-editor renders default browser’s select box, not Selectize box.
but when i remove:
enum: ["bold","italic","smallcaps"]
json-editor renders Selectize element, as expected.
So it there ability to use Selectize with array with predefined values?
Thanks for such a great lib!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Multi select drop down list for enum - Stack Overflow
I solved it on the client side with the following behaviour: Get method: [HttpGet] public ActionResult ValueAction(ValueEnum result) { //irrelevant code ...
Read more >Select Field - Alpaca Forms
Defines an f(a,b) sort function for the array of enumerated values [{text, value}]. This is used to sort enum and optionLabels as well...
Read more >Selectize
Selectize is the hybrid of a textbox and <select> box. It's jQuery-based and it's useful for tagging, contact lists, country selectors, and so...
Read more >json-editor/README.md at master - GitHub
enum_titles - An array of display values to use for select box options in the same order as defined with the enum keyword....
Read more >select_tag (ActionView::Helpers::FormTagHelper) - APIdock
option_tags is a string containing the option tags for the select box. Options. :multiple - If set to true, the selection will allow...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It does not documented, as a workaround you could move
enum
property into parent object as following:It would be rendered with
selectize
and treatedenum
asdefault
. Anyway, according to docsenum
property should be initems
and when enabling selectize it is expected to render all select control withselectize
. I will take a closer look.@mneofit You seem to be using
Selectize
and have a good grasp on how JSON-Editor works, so maybe this is something you could take a look at? (If you got the time 😁)