|
@@ -97,7 +97,7 @@ export function createEntityListSlices<T, F extends object>(
|
|
|
|
|
|
|
|
const selectionSlice = createSlice({
|
|
const selectionSlice = createSlice({
|
|
|
name: `${namespace}/selection`,
|
|
name: `${namespace}/selection`,
|
|
|
- initialState: { selectedIds: [] } as SelectionState,
|
|
|
|
|
|
|
+ initialState: { selectedIds: [], selectedSecondaryIds: [] } as SelectionState,
|
|
|
reducers: {
|
|
reducers: {
|
|
|
setSelectedIds(state, action: PayloadAction<string[]>) {
|
|
setSelectedIds(state, action: PayloadAction<string[]>) {
|
|
|
console.log('Setting selected IDs:', action.payload);
|
|
console.log('Setting selected IDs:', action.payload);
|
|
@@ -106,6 +106,13 @@ export function createEntityListSlices<T, F extends object>(
|
|
|
clearSelection(state) {
|
|
clearSelection(state) {
|
|
|
state.selectedIds = [];
|
|
state.selectedIds = [];
|
|
|
},
|
|
},
|
|
|
|
|
+ setSelectedSecondaryIds(state, action: PayloadAction<string[]>) {
|
|
|
|
|
+ console.log('Setting selected secondary IDs:', action.payload);
|
|
|
|
|
+ state.selectedSecondaryIds = action.payload;
|
|
|
|
|
+ },
|
|
|
|
|
+ clearSecondarySelection(state) {
|
|
|
|
|
+ state.selectedSecondaryIds = [];
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|