Sha256: 40ec985705ae2a98b04ee058d8134cbb98c47163d2e55078b6142528c6cce146
Contents?: true
Size: 532 Bytes
Versions: 80
Compression:
Stored size: 532 Bytes
Contents
import Immutable from 'seamless-immutable'; import { INVENTORY_FILTER_UPDATE, INVENTORY_FILTER_CLEAR, } from './InventoryFilterConstants'; const initialState = Immutable({ filterTerm: '', }); export default ( state = initialState, { type, payload: { filterTerm } = {} } ) => { switch (type) { case INVENTORY_FILTER_UPDATE: return state.merge({ filterTerm, }); case INVENTORY_FILTER_CLEAR: return state.merge({ filterTerm: '', }); default: return state; } };
Version data entries
80 entries across 80 versions & 1 rubygems