Added action to change rows per page
This commit is contained in:
1 parent
c379348581
commit
1419b20591
2 files changed
+59
-46
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user