chore: Turn off Allow filtering property on Table widget (#34593)

https://github.com/appsmithorg/appsmith/issues/34591

## Description
Making _Allow filtering_ option false by default.

<img width="798" alt="Allow filtering off"
src="https://github.com/appsmithorg/appsmith/assets/121817440/8ac64773-2385-433d-96fa-0a90080e2462">


Fixes #34591
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Table, @tag.Widget, @tag.Binding, @tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9795462304>
> Commit: e0c1e8376b702f13b9640c880cf5606af070a420
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9795462304&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table, @tag.Widget, @tag.Binding, @tag.Sanity`
<!-- end of auto-generated comment: Cypress test results  -->




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


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

- **Bug Fixes**
  - Filtering is now disabled by default for the `TableWidgetV2`.

- **Tests**
- Updated test scripts to enable filtering for `TableWidgetV2` in
multiple scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jacques Ikot <jacquesikot@gmail.com>
This commit is contained in:
carinanfonseca 2024-07-05 08:46:11 +01:00 committed by GitHub
parent 1325f652fd
commit a2f2f795c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 19 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import {
assertHelper,
locators,
draggableWidgets,
agHelper,
} from "../../../../../support/Objects/ObjectsCore";
describe(
@ -15,6 +16,8 @@ describe(
it("1. Adding Data to Table Widget", function () {
entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250);
//propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput));
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
//propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput));
propPane.UpdatePropertyFieldValue(

View File

@ -15,6 +15,8 @@ describe(
function () {
it("1. Verify Table Filter for 'empty'", function () {
entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
propPane.UpdatePropertyFieldValue(
"Table data",

View File

@ -16,6 +16,8 @@ describe(
it("1. Adding Data to Table Widget", function () {
entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250);
//propPane.EnterJSContext("Table data", JSON.stringify(this.dataSet.TableInput));
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
//propPane.EnterJSContext("Table Data", JSON.stringify(this.dataSet.TableInput));
propPane.UpdatePropertyFieldValue(

View File

@ -16,6 +16,8 @@ describe(
function () {
it("1. Verify Full table data - download csv and download Excel", function () {
entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
table.AddSampleTableData();
propPane.UpdatePropertyFieldValue(
"Table data",

View File

@ -27,6 +27,8 @@ describe(
() => {
before(() => {
entityExplorer.DragDropWidgetNVerify("tablewidgetv2", 650, 250);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
propPane.EnterJSContext("Table data", JSON.stringify(data));
assertHelper.AssertNetworkStatus("@updateLayout");
});

View File

@ -34,6 +34,8 @@ describe(
() => {
before(() => {
_.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.TABLE);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
_.agHelper.GetNClick(".t--property-control-allowfiltering input");
_.propPane.EnterJSContext("Table data", tableData);
cy.editColumn("completed");
cy.changeColumnType("Checkbox");

View File

@ -40,6 +40,8 @@ describe(
() => {
before(() => {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
propPane.EnterJSContext("Table data", tableData);
cy.editColumn("completed");
cy.changeColumnType("Switch");

View File

@ -34,6 +34,9 @@ describe(
});
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 300, 300);
// turn on filtering for the table - it is disabled by default in this PR(#34593)
agHelper.GetNClick(".t--property-control-allowfiltering input");
// Create SQL data-source
agHelper.GetNClick(oneClickBindingLocator.datasourceDropdownSelector);
agHelper.AssertElementExist(oneClickBindingLocator.otherActionSelector());

View File

@ -210,7 +210,7 @@ class TableWidgetV2 extends BaseWidget<TableWidgetProps, WidgetState> {
columnOrder: [],
enableClientSideSearch: true,
isVisibleSearch: true,
isVisibleFilters: true,
isVisibleFilters: false,
isVisibleDownload: true,
isVisiblePagination: true,
isSortable: true,