Horreum icon indicating copy to clipboard operation
Horreum copied to clipboard

Pagination for AllSchema.tsx should allow sorting by multiple fields, not just name

Open johnaohara opened this issue 1 year ago • 3 comments

Current the table headers allow sorting by different fields, name, urn, description etc.

This applies sorting to the current list of schemas. The sorting should be applied across the entire set of visible Schemas, so that sorting by description should apply sorting and pagination to the view.

johnaohara avatar May 09 '23 10:05 johnaohara

I think current header sorting by name only

 <CardBody style={{ overflowX: "auto" }}>
                    <Table columns={columns}
                    data={schemas?.schemas || []}
                    sortBy={[{ id: "name", desc: false }]}
                    isLoading={loading}
                    />
                </CardBody>

shivarm avatar May 18 '23 10:05 shivarm

That is the default for the UI, and it is possible to sort by other columns, but if a user selects a different column to sort by, the sorting is only done for the current paginated view of the data, not the global dataset.

For example, if i wanted to sort by Owner I would expect the entire result set to be sorted by owner, and not just the visible items, and then paginated according to the UI configuration for pagination

We need to pass sorting into the Api request to apply the sorting in the backend and not just the front end

johnaohara avatar May 18 '23 10:05 johnaohara

On Hold due to https://github.com/Hyperfoil/Horreum/discussions/1603

johnaohara avatar May 09 '24 08:05 johnaohara