Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions examples/react-grid/ant/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ export default function App() {

return (
<ConfigProvider theme={themeConfig}>
<div style={{ backgroundColor: "canvas", overflow: "auto" }}>
<ExamplesRouter
pluginId="ant"
components={{
basic: Basic,
"local-data": LocalData,
"remote-data": RemoteData,
}}
/>
</div>
<ExamplesRouter
pluginId="ant"
components={{
basic: Basic,
"local-data": LocalData,
"remote-data": RemoteData,
}}
/>
</ConfigProvider>
);
}
9 changes: 9 additions & 0 deletions examples/react-grid/ant/src/components/TableWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { ReactNode } from "react";

export function TableWrapper({ children }: { children: ReactNode }) {
return (
<div style={{ backgroundColor: "canvas", overflow: "auto" }}>
Comment thread
amanx5 marked this conversation as resolved.
{children}
</div>
);
}
5 changes: 4 additions & 1 deletion examples/react-grid/ant/src/examples/Basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { GridStoreProvider, useGridStoreSelector } from "@jsoc/react-grid";
import { useGridStore } from "@jsoc/react-grid-ant";
import { basicJSON } from "@jsoc/grid-examples-shared";
import { Table } from "antd";
import { TableWrapper } from "../components/TableWrapper";

export function Basic() {
const gridStore = useGridStore(basicJSON);
Expand All @@ -11,7 +12,9 @@ export function Basic() {

return (
<GridStoreProvider value={gridStore}>
<Table key={activeSchema.id} {...activeSchema.config} />
<TableWrapper>
<Table key={activeSchema.id} {...activeSchema.config} />
</TableWrapper>
</GridStoreProvider>
);
}
5 changes: 4 additions & 1 deletion examples/react-grid/ant/src/examples/LocalData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { GridStoreProvider, useGridStoreSelector } from "@jsoc/react-grid";
import { useGridStore } from "@jsoc/react-grid-ant";
import { ErrorBoundary, useGetLocalJSON } from "@jsoc/react-grid-examples";
import { Table } from "antd";
import { TableWrapper } from "../components/TableWrapper";

export function LocalData() {
const data = useGetLocalJSON();
Expand All @@ -23,7 +24,9 @@ function Example({ data }: { data: string }) {

return (
<GridStoreProvider value={gridStore}>
<Table key={activeSchema.id} {...activeSchema.config} />
<TableWrapper>
<Table key={activeSchema.id} {...activeSchema.config} />
</TableWrapper>
</GridStoreProvider>
);
}
5 changes: 4 additions & 1 deletion examples/react-grid/ant/src/examples/RemoteData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from "@jsoc/react-grid";
import { useGridStore } from "@jsoc/react-grid-ant";
import { Table } from "antd";
import { TableWrapper } from "../components/TableWrapper";

export function RemoteData() {
const { data, loading, error } = useGetRemoteJSON();
Expand All @@ -26,7 +27,9 @@ function Example({ data }: { data: string }) {
return (
<GridStoreProvider value={gridStore}>
<SimpleNavigator />
<Table key={activeSchema.id} {...activeSchema.config} />
<TableWrapper>
<Table key={activeSchema.id} {...activeSchema.config} />
</TableWrapper>
</GridStoreProvider>
);
}
Loading