Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const onChange = (value) => {
updateKnob('selectedValue', 'text', value)
}
const onDatesChange = ({ startDate, endDate }) => {
updateKnob('startDate', 'date', startDate || null)
updateKnob('endDate', 'date', endDate || null)
}
const onChange = (value) => {
updateKnob('currentValue', 'text', value)
}
const onToggle = (event, value) => {
event.preventDefault()
updateKnob('isOpen', 'boolean', value)
}
const onTabChange = (key) => {
updateKnob('activeKey', 'text', key)
}
const onDatesChange = ({ startDate, endDate }) => {
updateKnob('startDate', 'date', startDate || null)
updateKnob('endDate', 'date', endDate || null)
}
const onClick = (index) => updateKnob('active', 'number', index)
const onClick = (i) => updateKnob('activeKey', 'number', i)
const onSuggestionMultiSelected = (event, { suggestion: { value } }) => {
const suggestionsFilter = array('suggestionsFilter', [])
const nextSuggestionsFilter = suggestionsFilter.includes(value)
? suggestionsFilter.filter((item) => item !== value)
: [...suggestionsFilter, value]
updateKnob('suggestionsFilter', 'array', nextSuggestionsFilter)
updateKnob('placeholder', 'text', `${nextSuggestionsFilter.length} suggestions selected`)
}
const onFocusChange = (focusedInput) => {
updateKnob('focusedInput', 'select', focusedInput || 'none')
}