incredible-moccasinI
Refine15mo ago
7 replies
incredible-moccasin

Unable to migrate from useDataGrid to useTable

This works fine:
  const { dataGridProps } = useDataGrid({
    dataProviderName: 'inspections',
    pagination: {
      pageSize: 50,
    },
    resource: '/v1/companies/',
  });

This doesn't
  const {
    getHeaderGroups,
    getRowModel,
    getState,
    setPageIndex,
    getCanPreviousPage,
    getPageCount,
    getCanNextPage,
    nextPage,
    previousPage,
    setPageSize,
  } = useTable<InspectionCompany>({
    columns,
    refineCoreProps: {
      dataProviderName: 'inspections',
      pagination: {
        pageSize: 50,
      },
      resource: '/v1/companies/',
    },
  });


I get the following error
377431940-a7857d61-7f44-46d1-aeaa-2412a532a1bf.png
Was this page helpful?