CFE-5 fixed bug in datatable
This commit is contained in:
@@ -121,7 +121,7 @@ function DataTable(props) {
|
||||
}}
|
||||
enableColumnFilterModes
|
||||
muiTablePaperProps={{elevation: 0}}
|
||||
rowCount={data?.meta.totalRowCount}
|
||||
rowCount={data?.meta?.totalRowCount ?? 0}
|
||||
onColumnFilterFnsChange={setColumnFilterFns}
|
||||
onColumnFiltersChange={setColumnFilters}
|
||||
onPaginationChange={setPagination}
|
||||
@@ -130,7 +130,7 @@ function DataTable(props) {
|
||||
renderTopToolbarCustomActions={({table}) => (
|
||||
<>
|
||||
{props.enableCustomToolbar /* send condition */
|
||||
? <props.CustomToolbar fetchUrl={fetchUrl} mutate={mutate}/> /* send component */
|
||||
? <props.CustomToolbar mutate={mutate}/> /* send component */
|
||||
: "<span></span>"}
|
||||
</>
|
||||
)}
|
||||
@@ -163,7 +163,7 @@ function DataTable(props) {
|
||||
}}
|
||||
positionActionsColumn={"last"}
|
||||
enableRowActions={props.enableRowActions}
|
||||
renderRowActions={({row}) => <props.TableRowAction fetchUrl={fetchUrl} mutate={mutate} row={row}/>}
|
||||
renderRowActions={({row}) => <props.TableRowAction mutate={mutate} row={row}/>}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user