diff --git a/src/sections/Projects/Sistent/components/Table/index.js b/src/sections/Projects/Sistent/components/Table/index.js index c83b1ee7651f..26a9ce3fc679 100644 --- a/src/sections/Projects/Sistent/components/Table/index.js +++ b/src/sections/Projects/Sistent/components/Table/index.js @@ -4,11 +4,16 @@ import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; import { navigate } from "gatsby"; import { useLocation } from "@reach/router"; -import { ResponsiveDataTable, SistentThemeProviderWithoutBaseLine } from "@layer5/sistent"; +import { ResponsiveDataTable, SistentThemeProvider } from "@layer5/sistent"; import { basicColumns, basicData, basicOptions, customColumns, customData, options } from "./table-column"; +import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; +import { useState } from "react"; export const DataTable = () => { const location = useLocation(); + const { isDark } = useStyledDarkMode(); + const [tableCols, updateCols] = useState(basicColumns); + const [customTableCols, updateCustomCols] = useState(customColumns); return (
@@ -63,25 +68,30 @@ export const DataTable = () => {

A simple example of a table with three columns: Name, Type, and Description.

- + - + -

With customized columns

+

Sorting and Columns Visibility

A table with customized columns. Here data can be sorted and filtered. + This example demonstrates the use of Checkbox and clickable rows for selection, with a custom Toolbar.

- + - +
diff --git a/src/sections/Projects/Sistent/components/Table/table-column.js b/src/sections/Projects/Sistent/components/Table/table-column.js index 74d141cfd4cc..bbedfc1aec96 100644 --- a/src/sections/Projects/Sistent/components/Table/table-column.js +++ b/src/sections/Projects/Sistent/components/Table/table-column.js @@ -8,7 +8,7 @@ export const basicData = [ ]; export const basicOptions = { - filterType: "checkbox", + selectableRows: "none", }; export const customColumns = [