import { FieldValues } from "react-hook-form" import { DataGridBooleanCell, DataGridCurrencyCell, DataGridMultilineCell, DataGridNumberCell, DataGridReadOnlyCell, DataGridRoot, DataGridSkeleton, DataGridTextCell, DataGridExpandableTextCell, type DataGridRootProps, } from "./components" interface DataGridProps extends DataGridRootProps { isLoading?: boolean } const _DataGrid = ({ isLoading, // Lazy loading props - passed through to DataGridRoot totalRowCount, onFetchMore, isFetchingMore, hasNextPage, ...props }: DataGridProps) => { return isLoading ? ( 0 ? props.data.length : 10 } /> ) : ( ) } export const DataGrid = Object.assign(_DataGrid, { BooleanCell: DataGridBooleanCell, TextCell: DataGridTextCell, MultilineCell: DataGridMultilineCell, ExpandableTextCell: DataGridExpandableTextCell, NumberCell: DataGridNumberCell, CurrencyCell: DataGridCurrencyCell, ReadonlyCell: DataGridReadOnlyCell, })