appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: Table widget throws error on Sorting save/discard column

Open chandannkumar opened this issue 2 years ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

A table with inline editing enabled, when we try to Sort the Save/Discard column , it throws error. This is happening on Production as well

Steps To Reproduce

  1. Drag & Drop a Table widget
  2. Connect Table with data and enable a Edit option for columns
  3. Make sure Save/Discard column appears on Table widget
  4. Click on Save/Discard column header to sort the column.
  5. Observe the error and records are also not visible on Table

Public Sample App

No response

Environment

Production

Issue video log

https://www.loom.com/share/013dd9215d09428e89a5818310f6c3f6

Version

Cloud/Production

chandannkumar avatar Sep 19 '23 08:09 chandannkumar

Expected: it shouldn't be possible to click on Save/Discard column to change table sorting (it shouldn't take any action).

carinanfonseca avatar Aug 26 '24 11:08 carinanfonseca

Hello @carinanfonseca , trying to reproduce the issue. It is not showing any error.

saicharan-zemoso avatar Sep 03 '24 10:09 saicharan-zemoso

@saicharan-zemoso I am uploading a screen recording so you can see my steps to reproduce this issue.

Uploading Screen Recording 2024-09-04 at 01.19.54.mov…

carinanfonseca avatar Sep 04 '24 00:09 carinanfonseca

Hello @carinanfonseca , The video is not uploaded completely can you upload it again.

this is video when I tried to reproduce the issue in app.appsmith , release and in the local dev setup. I was not getting any error on trying to sort the save/discard column.

https://github.com/user-attachments/assets/908c04be-f15f-49e2-b173-f55404d66c49

saicharan-zemoso avatar Sep 04 '24 03:09 saicharan-zemoso

For some reason, I can't upload the video. Here is a link for the video: https://drive.google.com/file/d/1oP40JCUi7ql48-v771RTI7dfkH4F4_jz/view?usp=sharing

carinanfonseca avatar Sep 04 '24 09:09 carinanfonseca

@carinanfonseca , thanks for the video that was helpful in finding the issue.

The issue was it was passing a column name which does not exist in the actual table when the save/discard is chosen as a column to sort.: Screenshot from 2024-09-04 16-29-00

In the above picture it was taking "EditAction1" as sort column which does not exist in the actual table. we can resolve this by passing an empty string when the save/discard column is clicked.

saicharan-zemoso avatar Sep 04 '24 11:09 saicharan-zemoso

Good to know you understand the reason behind it. I see your approach, but I think it would be a cleaner solution to make the Save/Discard column unclickable and unsortable, as they are not relevant for that column. This would solve the problem entirely.

carinanfonseca avatar Sep 04 '24 12:09 carinanfonseca

Ok sure. And I will make sure that the user should still be able freeze the column left or right. only sort functionality should be removed for that column.

saicharan-zemoso avatar Sep 04 '24 12:09 saicharan-zemoso

Hello @carinanfonseca , I have raised a PR for this issue. No reviewers are assigned to this Pr. can you assign someone to review it: https://github.com/appsmithorg/appsmith/pull/36151

saicharan-zemoso avatar Sep 06 '24 11:09 saicharan-zemoso