Choices/src/scripts/src/actions/choices.js

37 lines
521 B
JavaScript
Raw Normal View History

2017-10-10 16:26:38 +02:00
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',
});