Skip to content

Unable to set totalRows #117

@stychu

Description

@stychu

The onRowsRequest is kinda inconvenient and not elastic enough to use when using React Query for data fetching.

I would like to be able to set totalRows in sync mode but instead totalRows are only able to be set when in async mode which need the use of onRowsRequest but I don't need to use onRowsRequest with ReactQuery.

mode === "sync" ? rowsApi.rows?.length : props.totalRows ?? totalRows;

Whenever I provide the property to the table it should take it no matter if its async or sync mode.

ReactQuery handles all internal data fetching logic and returns the results -> { isLoading, isError, data, refetch }
so I want just to supply the returned data to the react-grid-table via the rows and totalRows but I can't control totalRows in this case which prohibits me of using this like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions