Added action to change rows per page

This commit is contained in:
Daniel Cojocea committed 2024-08-20 17:27:07 -04:00
1 parent c379348581
commit 1419b20591
2 files changed
+59 -46

No files matched your search

+3 -3
View File
@@ -13,8 +13,8 @@ const uiSlice = createSlice({
name: "ui",
initialState,
reducers: {
setTablePreferences: (state, action) => {
state.table = { ...action };
setRowsPerPage: (state, action) => {
state.table.rowsPerPage = action.payload;
},
toggleSidebar: (state) => {
state.sidebar.collapsed = !state.sidebar.collapsed;
@@ -23,4 +23,4 @@ const uiSlice = createSlice({
});
export default uiSlice.reducer;
export const { setTablePreferences, toggleSidebar } = uiSlice.actions;
export const { setRowsPerPage, toggleSidebar } = uiSlice.actions;