mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-04 14:53:12 +02:00
18 lines
322 B
JavaScript
18 lines
322 B
JavaScript
const groups = (state = [], action) => {
|
|
switch (action.type) {
|
|
case 'ADD_GROUP': {
|
|
return [...state, {
|
|
id: action.id,
|
|
value: action.value,
|
|
active: action.active,
|
|
disabled: action.disabled,
|
|
}];
|
|
}
|
|
|
|
default: {
|
|
return state;
|
|
}
|
|
}
|
|
};
|
|
|
|
export default groups; |