UNPKG

@collectionspace/cspace-public-browser

Version:
20 lines (19 loc) 726 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSearchValue = exports.default = void 0; var _immutable = _interopRequireDefault(require("immutable")); var _actionCodes = require("../constants/actionCodes"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } var _default = (state = _immutable.default.Map(), action) => { switch (action.type) { case _actionCodes.SET_FILTER_SEARCH_VALUE: return state.setIn([action.meta.id, 'searchValue'], action.payload); default: return state; } }; exports.default = _default; const getSearchValue = (state, id) => state.getIn([id, 'searchValue']); exports.getSearchValue = getSearchValue;