mirror of
https://github.com/Choices-js/Choices.git
synced 2024-04-25 19:00:37 +02:00
f597bc9aff
* Remove travis.yml * Remove versioning from index file * Resolve linting issues * Resolve further linting issues * Uppercase NPM_TOKEN * Run audit fix * Update postversion command * Update @babel/core to latest * Update post version command * Housekeeping * Revert cypress upgrade * Enforce cypress version * Update package.lock * Add cypress project id
39 lines
613 B
JavaScript
39 lines
613 B
JavaScript
import { ACTION_TYPES } from '../constants';
|
|
|
|
export const addChoice = ({
|
|
value,
|
|
label,
|
|
id,
|
|
groupId,
|
|
disabled,
|
|
elementId,
|
|
customProperties,
|
|
placeholder,
|
|
keyCode,
|
|
}) => ({
|
|
type: ACTION_TYPES.ADD_CHOICE,
|
|
value,
|
|
label,
|
|
id,
|
|
groupId,
|
|
disabled,
|
|
elementId,
|
|
customProperties,
|
|
placeholder,
|
|
keyCode,
|
|
});
|
|
|
|
export const filterChoices = results => ({
|
|
type: ACTION_TYPES.FILTER_CHOICES,
|
|
results,
|
|
});
|
|
|
|
export const activateChoices = (active = true) => ({
|
|
type: ACTION_TYPES.ACTIVATE_CHOICES,
|
|
active,
|
|
});
|
|
|
|
export const clearChoices = () => ({
|
|
type: ACTION_TYPES.CLEAR_CHOICES,
|
|
});
|