Minor Changes
-
The
useDataGrid
hook required thecolumns
property. Therefore, thequeryResult
could not be used in thecolumns
. Now, we can define thecolumns
property wherever we want since theuseDataGrid
hook does not take thecolumn
property.export const PostsList: React.FC = () => { - const { dataGridProps } = useDataGrid<IPost>({ - columns, - }); + const { dataGridProps } = useDataGrid<IPost>(); return ( <List> - <DataGrid {...dataGridProps} autoHeight /> + <DataGrid {...dataGridProps} columns={columns} autoHeight /> </List> ); };