select-harlequinS
Refine2y ago
15 replies
select-harlequin

Can't change list pages

const { tableProps, filters } = useTable({
    resource: 'venues',
    onSearch: (values: any) => {
      return [
        {
          field: 'name',
          operator: 'contains',
          value: values.name,
        },
      ];
    },
    pagination: {
      pageSize: 20,
    },
    sorters: {
      initial: [
        {
          field: 'created',
          order: 'desc',
        },
      ],
    },
    filters: {
      permanent: [
        {
          field: 'business.id',
          operator: 'eq',
          value: sessionStorage.getItem('currentBusiness'),
        },
      ],
      initial: [
        {
          field: 'name',
          operator: 'contains',
          value: undefined,
        },
      ],
    },
    meta: {
      gqlQuery: VENUES_QUERY,
    },
  });


Why can't I change page to next one? The pagination arrow at the bottom of the page is disabled.

I my Table component I have it setup:

<Table
          {...tableProps}
          pagination={{ ...tableProps.pagination }}
          bordered
          rowHoverable
          showSorterTooltip
        >
Was this page helpful?