Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
21.69k stars 1.48k forks source link

Enable On-Click sorting in tables with external data sources #14156

Open mikesealey opened 1 month ago

mikesealey commented 1 month ago

Describe the feature request Feature Request from customer: Currently the old and new table components do no expose what column has been clicked on for sorting and do not allow us to disable user column sorting.

As we are using MSSQL queries we must rebuild the pagination ourselves which works but will provide in-correct sorting if the user clicks on a column header as its only sorting with the initial page of data the query returned. Ideally if we can capture either via a variable or via the table component outputs, the column name that has been sorted and its sort order we can pass these into our queries to perform the sort within the query itself.

Which boils down to

  1. Create settings toggle for the ability for the user to sort a table
  2. Surface the clicked-column to bindings for custom pagination sorted by column.
linear[bot] commented 1 month ago

BUDI-8453 Enable On-Click sorting in tables with external data sources

aptkingston commented 1 month ago

Do you know if this referring to the old table or the new table? I suppose they could use a custom paginated query with either, but this sounds more like the old table with explicit pagination to me, as opposed to the new table with endless scroll.

mikesealey commented 1 month ago

@aptkingston Customer that suggested it is indeed using the old table.

ConorWebb96 commented 1 month ago

If this is the old table, its unlikely to receive any updates as its deprecated.

The new table has sorting, so I'm going to close this.

benaunt commented 1 month ago

Sorry this happens on both the old and new table, if using a custom query there is no way to tell the query what table header has been selected for sorting (via the user UI) and the sort order of the heading.

If you have built custom pagination into your query, then the sorting no longer works.

Is the recommendation now for the new table component, to not put return limits on the query and just utilise the endless scrolling, would there be any performance considerations with that?