Choices
Choices copied to clipboard
set select's options by choices property. but how to add placeholder?
`
const options = [{ value: item.id, label: item.name, customProperties: { content: item.content } }];
new d_type = new Choices({ searchEnabled: false, removeItems: true, removeItemButton: true, shouldSort : false, allowHTML: true, choices:options, });
`
Solution for version 10.2.0 (maybe earlier version too).
const options = [
{ value: '', label: 'Select value', placeholder: true },
{ value: 'a', label: 'A' },
{ value: 'b', label: 'B' },
];