Sha256: b3a4158c9e5bbaebee1f69e135727e398cb81f0115ada30018fea8313c816b4d
Contents?: true
Size: 719 Bytes
Versions: 85
Compression:
Stored size: 719 Bytes
Contents
import Immutable from 'seamless-immutable'; import { INSIGHTS_SET_SELECTED_IDS, INSIGHTS_SET_SELECT_ALL_ALERT, INSIGHTS_SET_SELECT_ALL, } from './InsightsTableConstants'; const initialState = Immutable({ selectedIds: {}, showSelectAllAlert: false, isAllSelected: false, }); export default ( state = initialState, { payload: { selectedIds, showSelectAllAlert, isAllSelected } = {}, type } ) => { switch (type) { case INSIGHTS_SET_SELECTED_IDS: return state.merge({ selectedIds }); case INSIGHTS_SET_SELECT_ALL_ALERT: return state.merge({ showSelectAllAlert }); case INSIGHTS_SET_SELECT_ALL: return state.merge({ isAllSelected }); default: return state; } };
Version data entries
85 entries across 85 versions & 1 rubygems