Skip to content

Commit

Permalink
chore: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas committed Nov 14, 2023
1 parent b0f11e9 commit 9277e96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ag-grid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-ag-grid",
"version": "2.0.1",
"version": "2.0.2-alpha.1",
"type": "module",
"private": false,
"sideEffects": false,
Expand Down
11 changes: 10 additions & 1 deletion packages/ag-grid/src/lib/components/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-mod
import { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';
import useStyles from '@equinor/fusion-react-ag-grid-styles';
import { AgGridReact, AgGridReactProps } from '@ag-grid-community/react';
import { ThemeProvider } from '@equinor/fusion-react-styles';

type GridProps<TData> = {
height: number;
} & AgGridReactProps<TData>;

ModuleRegistry.registerModules([ClientSideRowModelModule, ServerSideRowModelModule]);

export function Grid<TData>({ columnDefs, gridOptions, height, rowData, modules, ...rest }: GridProps<TData>) {
export function Grid<TData>(props: GridProps<TData>) {
return (
<ThemeProvider theme={{}}>
<InnerGrid {...props} />
</ThemeProvider>
);
}

export function InnerGrid<TData>({ columnDefs, gridOptions, height, rowData, modules, ...rest }: GridProps<TData>) {
const styles = useStyles() as { root: string; grid: string };

return (
Expand Down

0 comments on commit 9277e96

Please sign in to comment.