appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix(#16584): filterTableData source of truth

Open anasKhafaga opened this issue 4 months ago • 11 comments

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 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"

:mag: Cypress test results

[!CAUTION]
If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • [x] Yes
  • [ ] No

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.
  • Style

    • Minor adjustments to comments and formatting for better readability.

anasKhafaga avatar Oct 13 '24 19:10 anasKhafaga