diff --git a/src/components/Datatable/Datatable.jsx b/src/components/Datatable/Datatable.jsx index fb0ae8f4..3cd87b2c 100644 --- a/src/components/Datatable/Datatable.jsx +++ b/src/components/Datatable/Datatable.jsx @@ -72,9 +72,8 @@ const DataTable = ({ return( <> -
+
{table.getHeaderGroups().map(headerGroup => ( - + {headerGroup.headers.map(header => )} ))} diff --git a/src/components/Datatable/datatable.scss b/src/components/Datatable/datatable.scss index d57536bd..7850e905 100644 --- a/src/components/Datatable/datatable.scss +++ b/src/components/Datatable/datatable.scss @@ -1,6 +1,11 @@ .dc-c-datatable { width: 100%; border-spacing: 0px; + thead > .dc-c-sticky-header { + position: sticky; + top: 0; + background-color: white; + } th { position: relative; text-align: left;