LFFE-2 update datatable component
This commit is contained in:
@@ -65,7 +65,7 @@ function DataTable(props) {
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
setupdateTime(moment().format("HH:mm | jYYYY/jM/jD"));
|
||||
setUpdateTime(moment().format("HH:mm | jYYYY/jMM/jDD"));
|
||||
}, [isValidating, languageApp]);
|
||||
|
||||
return (<MaterialReactTable
|
||||
@@ -83,21 +83,25 @@ function DataTable(props) {
|
||||
enableColumnResizing={props.enableColumnResizing}
|
||||
muiTableHeadCellProps={{
|
||||
sx: {
|
||||
color: "primary.main", borderLeft: "1px solid #e1e1e1", "&:first-of-type": {
|
||||
color: "primary.main",
|
||||
borderLeft: "1px solid #e1e1e1",
|
||||
"&:first-of-type": {
|
||||
borderLeft: "unset"
|
||||
}, "& .Mui-TableHeadCell-Content": {justifyContent: "space-between"},
|
||||
},
|
||||
"& .Mui-TableHeadCell-Content": {justifyContent: "space-between"},
|
||||
},
|
||||
}}
|
||||
muiTableBodyCellProps={{
|
||||
sx: {
|
||||
borderLeft: "1px solid #e1e1e1", "&:first-of-type": {
|
||||
borderLeft: "1px solid #e1e1e1",
|
||||
"&:first-of-type": {
|
||||
borderLeft: "unset"
|
||||
}
|
||||
},
|
||||
}}
|
||||
enableColumnFilterModes
|
||||
muiTablePaperProps={{elevation: 0}}
|
||||
rowCount={rowCount}
|
||||
rowCount={data?.meta?.totalRowCount ?? 0}
|
||||
onColumnFilterFnsChange={setColumnFilterFns}
|
||||
onColumnFiltersChange={setColumnFilters}
|
||||
onPaginationChange={setPagination}
|
||||
@@ -123,7 +127,11 @@ function DataTable(props) {
|
||||
</Typography>) : ("")}
|
||||
</>)}
|
||||
state={{
|
||||
isLoading: isValidating, columnFilters, columnFilterFns, pagination, sorting,
|
||||
showProgressBars: isValidating,
|
||||
columnFilters,
|
||||
columnFilterFns,
|
||||
pagination,
|
||||
sorting,
|
||||
}}
|
||||
positionActionsColumn={"last"}
|
||||
enableRowActions={props.enableRowActions}
|
||||
|
||||
Reference in New Issue
Block a user