Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import SelectBox, { Item, ItemGroup, IEventObjects } from '@toast-ui/select-box';
const container =
document.querySelector('#container') ||
document.getElementById('container') ||
document.createElement('div') ||
'#container';
const selectBox = new SelectBox(container, {
data: [
{
label: 'Fruits',
data: [
{ label: 'Apple', value: 'apple', selected: true },
{ label: 'Banana', value: 'banana' }
]
},
{ label: 'The quick brown fox jumps over the lazy dog.', value: 'none' },
{
label: 'Colors',
data: [
{ label: 'Red', value: 'red' },
{ label: 'Yellow', value: 'yellow' },
{ label: 'Green', value: 'green', disabled: true },
{ label: 'Blue', value: 'blue', disabled: true },