mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-31 21:12:35 +02:00
15 lines
328 B
JavaScript
15 lines
328 B
JavaScript
const groups = (state = [], action) => {
|
|
switch (action.type) {
|
|
case 'ADD_GROUP':
|
|
return [...state, {
|
|
id: parseInt(action.id),
|
|
value: action.value,
|
|
disabled: false,
|
|
}];
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default groups; |