lucid-ui
Version:
A UI component library from Xandr.
28 lines • 785 B
JavaScript
import _ from 'lodash';
import * as DropMenu from '../DropMenu/DropMenu.reducers';
import * as SearchField from '../SearchField/SearchField.reducers';
export function onSelect(state, selectedIndex) {
const arr = [];
return {
...state,
selectedIndices: _.xor(state.selectedIndices, arr.concat(selectedIndex)),
};
}
export function onSearch(state, searchText, firstVisibleIndex) {
return {
...state,
searchText,
DropMenu: {
...DropMenu.onFocusOption(state.DropMenu, firstVisibleIndex),
},
};
}
export function onRemoveAll(state) {
return {
...state,
selectedIndices: [],
};
}
export { DropMenu };
export default SearchField;
//# sourceMappingURL=SearchableMultiSelect.reducers.js.map