appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Feature]: Add a Sortable toggle to table column properties

Open AS-Laguna opened this issue 1 year ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Summary

Sometimes it's beneficial to restrict sorting on certain columns. It may not make sense to sort by a certain field, or you may be running a custom query onSort and attempting to sort a custom column will cause the query to fail. It would be nice if each column had a property toggle to allow/disallow sorting of the column.

Why should this be worked on?

This will improve the UX control of the developer by allowing them to disable a behavior that could potentially break the table or confuse the data for the end user.

Front logo Front conversations

AS-Laguna avatar May 04 '23 16:05 AS-Laguna

Hey @AS-Laguna, Do we know what fails for the user if this sortable action is not present? I am trying to understand their use case better!

somangshu avatar May 09 '23 13:05 somangshu

For the user I raised this for, their table breaks if they sort by a custom column because they run a query on sort and the column doesn't exist. @somangshu

They also expressed the desire to control what columns their users can sort by.

ghost avatar May 09 '23 14:05 ghost

@momcilo-appsmith @keyurparalkar can you folks check the above use case and see if it makes sense, why did we not do this in the first place, or this is already planned

somangshu avatar May 10 '23 10:05 somangshu

This makes sense. We didn't get to it previously, because it wasn't pointed out and we didn't think about it earlier. I would suggest adding a "Disable sorting" option in the property pane for columns. @keyurparalkar if you need help with prioritising this reach out to me on Slack.

momcilo-appsmith avatar May 11 '23 05:05 momcilo-appsmith

By default, a new table created with the ability to edit fields per-line will error when the user clicks to sort the delete and save / discard columns. Fairly easy to do by mistake, and when that happens the query fails and no data shows in the table.

Additionally, disabling column sorting seems to have no effect, it still lets you sort.

Not all data or columns are appropriate to be sorted on.

Entelin avatar Apr 26 '24 17:04 Entelin