This commit is contained in:
Amirhossein Mahmoodi
2024-04-23 10:19:40 +03:30
parent 40f56d3cea
commit 5c5aa33741
10 changed files with 370 additions and 25 deletions

View File

@@ -0,0 +1,19 @@
import { useMaterialReactTable } from "material-react-table";
import DataTable_Paper from "./table/Paper";
const isTableInstanceProp = (props) => props.table !== undefined;
const DataTable_Main = (props) => {
let table;
if (isTableInstanceProp(props)) {
table = props.table;
} else {
// eslint-disable-next-line react-hooks/rules-of-hooks
table = useMaterialReactTable(props);
}
return <DataTable_Paper table={table} />;
};
export default DataTable_Main;