split
Description
Optional. Allows freezing the leftmost columns while scrollingUsage
split?: {
left: number
};
Parameters
left
- the number of leftmost rows that will remain visible while scrolling (default is 0)
Example
import { useState } from "react";
import { Grid } from "@svar-ui/react-grid";
import { getData } from "./common/data";
export default function App() {
const { data, columns } = getData();
const [left, setLeft] = useState(3); // freeze 3 columns
return (
<Grid
data={data}
columns={columns}
split={{ left }}
/>
);
}