appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: Table filter issues

Open souma-ghosh opened this issue 3 years ago • 4 comments

Description

Bug 12638 After adding 3 filters to a table and removing the second filter, the current second filter value was showing the old second filter value. This was happening because we were not passing unique keys to the filters while rendering the filters list. Hence added a unique key to filter in filters list.

Bug 12642 After adding 3 filters and then changing the operator of second filter from AND to OR or vice versa, then removing the first filter caused the operator to go back to the previous value. This was happening because we are adding the OR operator to a filter by default. When we are changing the operator from the dropdown the value gets updated to the second filter only in the state. All other filters persisted with the previous operator value. Hence this has been solved by updating the operator of all filters (after the second filter) whenever user changes the operator of the second filter from the operator dropdown.

Fixes #12642, #12638

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Cypress tests

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes

souma-ghosh avatar Sep 20 '22 10:09 souma-ghosh

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Sep 20, 2022 at 10:15AM (UTC)

vercel[bot] avatar Sep 20 '22 10:09 vercel[bot]

/ok-to-test sha=c8b7cd3

souma-ghosh avatar Sep 21 '22 12:09 souma-ghosh

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3098957112. Workflow: Appsmith External Integration Test Workflow. Commit: c8b7cd3. PR: 16904.

github-actions[bot] avatar Sep 21 '22 15:09 github-actions[bot]

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/3098957112. Commit: ``. Results:

Click to view performance test results

| | Run 1 (ms)| Run 2 (ms)| Run 3 (ms)| Run 4 (ms)| Run 5 (ms)| Minimum (ms)| Median (ms)| Mean (ms)| Range (%) | SD.Sample (%) | SD.Population (%)| | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | SELECT_CATEGORY| | | | | | | | | | | | scripting | 383.7 | 407.22 | 353.84 | 341.53 | 370.58 | 341.53| 370.58| 371.37 | 17.69| 6.91 | 6.18| | painting | 3.59 | 3.73 | 3.34 | 5.03 | 9 | 3.34| 3.73| 4.94 | 114.57| 47.77 | 42.71| | rendering | 112.18 | 109.97 | 104.39 | 104.65 | 107.45 | 104.39| 107.45| 107.73 | 7.23| 3.13 | 2.80| BIND_TABLE_DATA| | | | | | | | | | | | scripting | 1188.39 | 1205.02 | 1110.93 | 1118.02 | 1199.29 | 1110.93| 1188.39| 1164.33 | 8.08| 3.95 | 3.53| | painting | 18.64 | 30.71 | 16.24 | 23.79 | 17.53 | 16.24| 18.64| 21.38 | 67.68| 27.83 | 24.88| | rendering | 936.04 | 887.55 | 818.48 | 807.74 | 819.92 | 807.74| 819.92| 853.95 | 15.02| 6.52 | 5.84| CLICK_ON_TABLE_ROW| | | | | | | | | | | | scripting | 924.69 | 1033.55 | 885.17 | 897.7 | 958.12 | 885.17| 924.69| 939.85 | 15.79| 6.32 | 5.65| | painting | 20.98 | 10.56 | 15.9 | 11.17 | 15.2 | 10.56| 15.2| 14.76 | 70.60| 28.46 | 25.47| | rendering | 332.13 | 322.43 | 299.54 | 318.96 | 312.48 | 299.54| 318.96| 317.11 | 10.28| 3.82 | 3.42| UPDATE_POST_TITLE| | | | | | | | | | | | scripting | 1689.23 | 1682.04 | 1306.64 | 1636.79 | 2483.93 | 1306.64| 1682.04| 1759.73 | 66.90| 24.70 | 22.09| | painting | 16.02 | 15.69 | 11.56 | 17.59 | 29.09 | 11.56| 16.02| 17.99 | 97.44| 36.63 | 32.80| | rendering | 499.31 | 512.87 | 451.7 | 506.16 | 704.58 | 451.7| 506.16| 534.92 | 47.27| 18.29 | 16.36| OPEN_MODAL| | | | | | | | | | | | scripting | 466.49 | 489.35 | 453.04 | 484.35 | 841.44 | 453.04| 484.35| 546.93 | 71.01| 30.22 | 27.03| | painting | 8.71 | 14.07 | 16.68 | 8.87 | 20.61 | 8.71| 14.07| 13.79 | 86.29| 37.13 | 33.21| | rendering | 384.08 | 406.66 | 390.01 | 397.39 | 618.26 | 384.08| 397.39| 439.28 | 53.31| 22.86 | 20.44| CLOSE_MODAL| | | | | | | | | | | | scripting | 208.88 | 275.47 | 224.37 | 178.43 | 829.07 | 178.43| 224.37| 343.24 | 189.56| 79.78 | 71.36| | painting | 5.76 | 7.68 | 17.28 | 4.17 | 13.09 | 4.17| 7.68| 9.6 | 136.56| 56.88 | 50.83| | rendering | 350.77 | 351.9 | 338.11 | 373.48 | 422.41 | 338.11| 351.9| 367.33 | 22.95| 9.07 | 8.11| SELECT_WIDGET_MENU_OPEN| | | | | | | | | | | | scripting | 1034.53 | 934.77 | 917.35 | 1035.23 | 981.42 | 917.35| 981.42| 980.66 | 12.02| 5.58 | 4.99| | painting | 20.75 | 11.8 | 4.3 | 15.29 | 11.09 | 4.3| 11.8| 12.65 | 130.04| 47.67 | 42.61| | rendering | 647.14 | 604.4 | 592.36 | 651.72 | 619.94 | 592.36| 619.94| 623.11 | 9.53| 4.17 | 3.73| SELECT_WIDGET_SELECT_OPTION| | | | | | | | | | | | scripting | 164.41 | 149.9 | 164.74 | 174.53 | 170.3 | 149.9| 164.74| 164.78 | 14.95| 5.66 | 5.06| | painting | 4.67 | 5.45 | 2.25 | 5.95 | 2.18 | 2.18| 4.67| 4.1 | 91.95| 43.41 | 38.78| | rendering | 324.45 | 310 | 310.05 | 329.43 | 323.51 | 310| 323.51| 319.49 | 6.08| 2.80 | 2.50|

github-actions[bot] avatar Sep 21 '22 15:09 github-actions[bot]

/ok-to-test sha=c8b7cd3

souma-ghosh avatar Sep 22 '22 04:09 souma-ghosh

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3102876364. Workflow: Appsmith External Integration Test Workflow. Commit: c8b7cd3. PR: 16904.

github-actions[bot] avatar Sep 22 '22 04:09 github-actions[bot]

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/3102876364. Commit: ``. Results:

Click to view performance test results

| | Run 1 (ms)| Run 2 (ms)| Run 3 (ms)| Run 4 (ms)| Run 5 (ms)| Minimum (ms)| Median (ms)| Mean (ms)| Range (%) | SD.Sample (%) | SD.Population (%)| | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | SELECT_CATEGORY| | | | | | | | | | | | scripting | 391.45 | 338.04 | 336.31 | 327.34 | 367.2 | 327.34| 338.04| 352.07 | 18.21| 7.56 | 6.77| | painting | 3.61 | 4.83 | 3.05 | 5.1 | 4.1 | 3.05| 4.1| 4.14 | 49.52| 20.53 | 18.36| | rendering | 108.13 | 106.74 | 105.71 | 104.65 | 106.43 | 104.65| 106.43| 106.33 | 3.27| 1.21 | 1.08| BIND_TABLE_DATA| | | | | | | | | | | | scripting | 1025.92 | 1046.87 | 1132.52 | 1084.41 | 1157.37 | 1025.92| 1084.41| 1089.42 | 12.07| 5.10 | 4.56| | painting | 15.76 | 20.19 | 25.82 | 12.86 | 16.58 | 12.86| 16.58| 18.24 | 71.05| 27.30 | 24.40| | rendering | 805.71 | 808.28 | 802.29 | 785.79 | 807.41 | 785.79| 805.71| 801.9 | 2.80| 1.16 | 1.04| CLICK_ON_TABLE_ROW| | | | | | | | | | | | scripting | 886.03 | 912.4 | 820.34 | 911.05 | 909.18 | 820.34| 909.18| 887.8 | 10.37| 4.42 | 3.95| | painting | 10.3 | 14.76 | 10.9 | 12.54 | 9.87 | 9.87| 10.9| 11.67 | 41.90| 17.14 | 15.34| | rendering | 301.32 | 301.37 | 288.11 | 296.28 | 307.19 | 288.11| 301.32| 298.85 | 6.38| 2.39 | 2.14| UPDATE_POST_TITLE| | | | | | | | | | | | scripting | 1878.32 | 1416.71 | 1458.65 | 1309.5 | 1315.89 | 1309.5| 1416.71| 1475.81 | 38.54| 15.86 | 14.18| | painting | 13.02 | 20.57 | 13.33 | 14.52 | 20.1 | 13.02| 14.52| 16.31 | 46.29| 22.81 | 20.42| | rendering | 451.84 | 507.89 | 453.04 | 441.9 | 453.48 | 441.9| 453.04| 461.63 | 14.29| 5.70 | 5.09| OPEN_MODAL| | | | | | | | | | | | scripting | 444.37 | 422.34 | 963.32 | 430.7 | 486.98 | 422.34| 444.37| 549.54 | 98.44| 42.33 | 37.86| | painting | 16.46 | 20.69 | 7.27 | 17.26 | 8.52 | 7.27| 16.46| 14.04 | 95.58| 41.67 | 37.25| | rendering | 370.14 | 364.3 | 373.2 | 375.58 | 377.25 | 364.3| 373.2| 372.09 | 3.48| 1.37 | 1.23| CLOSE_MODAL| | | | | | | | | | | | scripting | 210.65 | 192.25 | 194.57 | 170.26 | 194.87 | 170.26| 194.57| 192.52 | 20.98| 7.50 | 6.71| | painting | 4.98 | 9.01 | 9.42 | 11.5 | 13.17 | 4.98| 9.42| 9.62 | 85.14| 32.12 | 28.69| | rendering | 337.26 | 343.03 | 339.75 | 334.69 | 325.78 | 325.78| 337.26| 336.1 | 5.13| 1.95 | 1.74| SELECT_WIDGET_MENU_OPEN| | | | | | | | | | | | scripting | 918.86 | 956.76 | 907.21 | 938.16 | 904.34 | 904.34| 918.86| 925.07 | 5.67| 2.39 | 2.14| | painting | 5.69 | 6.16 | 12.71 | 5.6 | 11.87 | 5.6| 6.16| 8.41 | 84.54| 42.33 | 37.93| | rendering | 590.51 | 615.16 | 597.74 | 602.59 | 590.21 | 590.21| 597.74| 599.24 | 4.16| 1.72 | 1.54| SELECT_WIDGET_SELECT_OPTION| | | | | | | | | | | | scripting | 167.3 | 158.08 | 186.04 | 164.65 | 150.66 | 150.66| 164.65| 165.35 | 21.40| 8.01 | 7.16| | painting | 11.44 | 1.95 | 9.67 | 3.63 | 1.93 | 1.93| 3.63| 5.72 | 166.26| 78.85 | 70.45| | rendering | 313.7 | 307.32 | 307.66 | 310.99 | 300.22 | 300.22| 307.66| 307.98 | 4.38| 1.64 | 1.47|

github-actions[bot] avatar Sep 22 '22 05:09 github-actions[bot]

Tested and verified for #12642 and #12638

PR is working as expected.

laveena-en avatar Sep 22 '22 07:09 laveena-en