remove unused grid

master
Tudor Stanciu 2022-12-08 00:55:15 +02:00
parent e3fad73d40
commit f96fe1164b
1 changed files with 38 additions and 42 deletions

View File

@ -174,48 +174,44 @@ const ResourcesContainer = () => {
{state.loaded === false ? ( {state.loaded === false ? (
<CircularProgress size={26} /> <CircularProgress size={26} />
) : ( ) : (
<Grid container spacing={4}> <MUIDataTable
<Grid item xs={12}> title="Resources"
<MUIDataTable columns={columns}
title="Resources" data={state.values ?? []}
columns={columns} options={{
data={state.values ?? []} filterType: "textField",
options={{ expandableRows: false,
filterType: "textField", print: false,
expandableRows: false, selectableRows: "none",
print: false, rowsPerPage: state.pageSize,
selectableRows: "none", rowsPerPageOptions: __ROWS_PER_PAGE_OPTIONS,
rowsPerPage: state.pageSize, count: state.totalCount,
rowsPerPageOptions: __ROWS_PER_PAGE_OPTIONS, customSearchRender: debounceSearchRender(500),
count: state.totalCount, onChangePage: (currentPage) => {
customSearchRender: debounceSearchRender(500), setFilters((prev) => ({ ...prev, page: currentPage + 1 }));
onChangePage: (currentPage) => { },
setFilters((prev) => ({ ...prev, page: currentPage + 1 })); onChangeRowsPerPage: (numberOfRows) => {
}, setFilters((prev) => ({ ...prev, pageSize: numberOfRows }));
onChangeRowsPerPage: (numberOfRows) => { },
setFilters((prev) => ({ ...prev, pageSize: numberOfRows })); onColumnSortChange: (changedColumn, direction) =>
}, setFilters((prev) => ({
onColumnSortChange: (changedColumn, direction) => ...prev,
setFilters((prev) => ({ sortBy: changedColumn,
...prev, sortDirection: direction
sortBy: changedColumn, })),
sortDirection: direction onFilterChange: handleFilterChange,
})), onSearchChange: (text) =>
onFilterChange: handleFilterChange, setFilters((prev) => ({ ...prev, fullTextSearch: text })),
onSearchChange: (text) => customSort: (data) => data,
setFilters((prev) => ({ ...prev, fullTextSearch: text })), customSearch: () => true,
customSort: (data) => data, setFilterChipProps: (_colIndex, _colName, _data) => {
customSearch: () => true, return {
setFilterChipProps: (_colIndex, _colName, _data) => { color: "primary",
return { variant: "outlined"
color: "primary", };
variant: "outlined" }
}; }}
} />
}}
/>
</Grid>
</Grid>
)} )}
</> </>
); );