Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Table inline editing behavior when filter is applied to table data #16584

Open
1 task done
chandannkumar opened this issue Sep 6, 2022 · 4 comments
Open
1 task done
Assignees
Labels
Bug Something isn't working Inviting Contribution Issues that we would like contributions to Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Production Table Widget V2 Issues related to Table Widget V2 Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@chandannkumar
Copy link

chandannkumar commented Sep 6, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Description

While editing Table row when filter is applied to table data is currently not possible since filter is updating the results without validating or saving the updated(edited) value on Table data.

https://www.loom.com/share/335d0c61817646a0903d581adf73064e

Steps To Reproduce

  1. Drag & Drop Table widget
  2. Enable Editable option for a column
  3. Filter the data with some condition
  4. Now try to edit the row
  5. Observe that, without saving the editable row the filter results get updated and there is no option to Save/Discard the changes until filter is cleared

Public Sample App

No response

Version

Cloud/Production

Front logo Front conversations

@chandannkumar chandannkumar added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Needs Triaging Needs attention from maintainers to triage Table Widget V2 Issues related to Table Widget V2 labels Sep 6, 2022
@github-actions github-actions bot added the Widgets Product This label groups issues related to widgets label Sep 6, 2022
@rxunique
Copy link

+1

run into the same problem, seems only workaround currently is to manually re-write the filter logic and UI, which feels like reinventing a massive wheel.

a relative easier fix it to make filter & search box point to rawData or selected data source. This currently is not possible

Use case example:

A table with 3 status, Good, Bad, Unknown. You want to go through all the Unknown and change them, trivial to either use filter or search to filter out all the Unknown.

Now if you edit the status, the row disappears, and you can't use inline Save

@Nikhil-Nandagopal Nikhil-Nandagopal added Medium Issues that frustrate users due to poor UX and removed High This issue blocks a user from building or impacts a lot of users labels Feb 2, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added the Widgets & Accelerators Pod Issues related to widgets & Accelerators label Aug 6, 2024
@carinanfonseca carinanfonseca added the Inviting Contribution Issues that we would like contributions to label Aug 16, 2024
@anasKhafaga
Copy link
Contributor

Could you assign this issue to me, @carinanfonseca @Nikhil-Nandagopal

@rahulbarwal
Copy link
Contributor

@anasKhafaga sure, go ahead!

@anasKhafaga
Copy link
Contributor

@rahulbarwal ,
Sorry for getting back a bit late but the env takes much time to be ready. Whenever you have time, kindly check the referenced PR.

yatinappsmith pushed a commit that referenced this issue Oct 30, 2024
## Description
> **TL;DR**: This PR addresses is related to #16584 where editing a
table row with applied filters becomes impossible without clearing the
filters

When a filter is applied to the table data, the current behavior results
in filter updates without validating or saving the updated value of the
row being edited. This leads to a situation where users are unable to
save or discard changes until the filters are cleared. The proposed fix
ensures that the original row is retrieved from the table data and used
in filtering, allowing editing and filtering to work as expected.

Here's a [screen
record](https://drive.google.com/file/d/1JuP_UN_B1vzz_oMeR1ojjPscF_mB3A4x/view?usp=sharing)
for the solution

### Motivation:
The problem arises in scenarios where table rows are editable and
filters are applied. This change ensures that users can continue editing
table rows without being forced to clear filters first.

### Context:
This change is required to improve user experience and fix the broken
editing functionality when filters are active. The change ensures that
editable values in filtered rows are correctly handled and saved.

Fixes https://www.loom.com/share/335d0c61817646a0903d581adf73064e

## Automation

/ok-to-test tags="table-widget,filter,edit"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->

## Communication
Should the DevRel and Marketing teams inform users about this change?
- [x] Yes
- [ ] No



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Improved filtering accuracy in the TableWidgetV2 by using original row
data for evaluations.

- **Bug Fixes**
- Enhanced functionality to ensure that filtering conditions are
evaluated correctly with original data.

- **Tests**
- Added new test cases to validate filtering functionality after edits
in the TableWidgetV2.
- Expanded test coverage for checkbox and switch interactions to ensure
accurate filtering behavior, including new interactions with a discard
button.

- **Style**
	- Minor adjustments to comments and formatting for better readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Inviting Contribution Issues that we would like contributions to Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Production Table Widget V2 Issues related to Table Widget V2 Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

9 participants