mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-09 17:16:36 +02:00
30 lines
489 B
JavaScript
30 lines
489 B
JavaScript
export const addItem = (value, id) => {
|
|
return {
|
|
type: 'ADD_ITEM',
|
|
value: value,
|
|
id: id
|
|
}
|
|
};
|
|
|
|
export const removeItem = (id) => {
|
|
return {
|
|
type: 'REMOVE_ITEM',
|
|
id: id
|
|
}
|
|
};
|
|
|
|
export const selectItem = (id, value) => {
|
|
return {
|
|
type: 'SELECT_ITEM',
|
|
id: id,
|
|
value: value
|
|
}
|
|
};
|
|
|
|
export const addOption = (value, id) => {
|
|
return {
|
|
type: 'ADD_OPTION',
|
|
value: value,
|
|
id: id
|
|
}
|
|
}; |