mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-25 18:12:23 +02:00
37 lines
521 B
JavaScript
37 lines
521 B
JavaScript
|
export const addChoice = (
|
||
|
value,
|
||
|
label,
|
||
|
id,
|
||
|
groupId,
|
||
|
disabled,
|
||
|
elementId,
|
||
|
customProperties,
|
||
|
placeholder,
|
||
|
keyCode,
|
||
|
) => ({
|
||
|
type: 'ADD_CHOICE',
|
||
|
value,
|
||
|
label,
|
||
|
id,
|
||
|
groupId,
|
||
|
disabled,
|
||
|
elementId,
|
||
|
customProperties,
|
||
|
placeholder,
|
||
|
keyCode,
|
||
|
});
|
||
|
|
||
|
export const filterChoices = results => ({
|
||
|
type: 'FILTER_CHOICES',
|
||
|
results,
|
||
|
});
|
||
|
|
||
|
export const activateChoices = (active = true) => ({
|
||
|
type: 'ACTIVATE_CHOICES',
|
||
|
active,
|
||
|
});
|
||
|
|
||
|
export const clearChoices = () => ({
|
||
|
type: 'CLEAR_CHOICES',
|
||
|
});
|