Table / Simple
Loading example...a | b | c |
---|
|
cell_a_0 | cell_b_0 | cell_c_0 |
cell_a_1 | cell_b_1 | cell_c_1 |
cell_a_2 | cell_b_2 | cell_c_2 |
cell_a_3 | cell_b_3 | cell_c_3 |
cell_a_4 | cell_b_4 | cell_c_4 |
cell_a_5 | cell_b_5 | cell_c_5 |
cell_a_6 | cell_b_6 | cell_c_6 |
cell_a_7 | cell_b_7 | cell_c_7 |
import { useVirtual, Table } from "@af-utils/react-table";
const columns = [{ key: "a" }, { key: "b" }, { key: "c" }];
const getRowData = i => ({
a: `cell_a_${i}`,
b: `cell_b_${i}`,
c: `cell_c_${i}`
});
const SimpleTable = () => {
const model = useVirtual({
itemCount: 10000
});
return (
<Table
model={model}
className="h-full basic-table-container"
getRowData={getRowData}
columns={columns}
/>
);
};
export default SimpleTable;