PromucFlow_constructor/app/client
Souma Ghosh c79f93fcfe
fix: Table filter text loses focus when user is typing (#19951)
## Description

TL;DR
When user types in the input box for table filter, the input loses focus
after a 500ms while typing. This is a regression from
https://github.com/appsmithorg/appsmith/pull/16904 PR (bug -
https://github.com/appsmithorg/appsmith/issues/12638)


We were stringifying the whole filter object and using it in the key for
each table filter. But when we changed the filter value the key would
get updated and hence the filter re-rendered and the text input lost
focus.
The key was previously set this way to address another bug where the
value field of the filter would not update in the DOM although the
filter data was correct.
The solution to address both these issues was to assign a unique key to
the filters. Since the filter data is totally front-end generated we do
not have any unique id to use here as the key. So we generate unique id
for each filter now and use it as the key.

Fixes #18040 

## Type of change

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

## How Has This Been Tested?

- Manual

### Test Plan
> Add Testsmith test cases links that relate to this PR
> Suggested tests
>- Verify that value input does not lose focus in table filter
>- Verify bug - https://github.com/appsmithorg/appsmith/issues/12638
>- Verify that clearing filters don't reset the current page in the
table and only adding and applying a filter resets the page to 1
>- Verify basic filter functionalities

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-02-09 16:59:06 +05:30
..
cypress feat: Feature/evaluated value window (#19972) 2023-02-09 16:39:54 +05:30
docker chore: Remove Maps API Key env variable for client (#19486) 2023-02-07 14:53:15 +05:30
generators feat: Auto height instant update (#19082) 2023-02-03 11:17:40 +05:30
patches
perf ci: run fat container docker inside perf tests and update setup-perf-test workflow to use localhost for accessing dev environment (#20280) 2023-02-07 15:56:41 +05:30
public chore: Remove Maps API Key env variable for client (#19486) 2023-02-07 14:53:15 +05:30
src fix: Table filter text loses focus when user is typing (#19951) 2023-02-09 16:59:06 +05:30
test chore: Render below the fold widget components when browser is idle using Intersection Observer (#18747) 2023-02-08 16:53:39 +05:30
typings fix: doc viewer and xlsx fixes (#19427) (#20113) 2023-02-08 15:22:51 +05:30
.babelrc
.dockerignore
.editorconfig
.eslintrc.json
.flowconfig
.gitignore
.huskyrc
.lintstagedrc
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
build.sh ci: Ship source maps + fix perf test failures on EE (#18700) 2022-12-09 18:40:59 +05:30
craco.build.config.js feat: Automatic height updates for widgets based on contents (Auto Height) (#18341) 2022-11-23 15:18:23 +05:30
craco.common.config.js
craco.dev.config.js chore: updated dependencies removed unused dependencies. (#19441) 2023-01-06 19:12:03 +05:30
cypress_ci.json test: Cypress Flaky fixes + Mock api update + PgAdminspec fix (#20032) 2023-02-02 13:29:24 +05:30
cypress.env.json feat: [Context Switching] Complex widgets and other Phase 2 items (#17046) 2022-12-08 12:51:58 +05:30
cypress.json test: Cypress Flaky fixes + Mock api update + PgAdminspec fix (#20032) 2023-02-02 13:29:24 +05:30
Dockerfile
index.tsx
jest.config.js chore: Remove Maps API Key env variable for client (#19486) 2023-02-07 14:53:15 +05:30
package.json fix: doc viewer and xlsx fixes (#19427) (#20113) 2023-02-08 15:22:51 +05:30
postcss.config.js
README.md
README.old.md
start-https.sh chore: Remove Maps API Key env variable for client (#19486) 2023-02-07 14:53:15 +05:30
stats.json
tailwind.config.js
tsconfig.json feat: Import javascript libraries (#17895) 2022-12-21 22:44:47 +05:30
tsconfig.path.json
vercel.json
yarn.lock fix: doc viewer and xlsx fixes (#19427) (#20113) 2023-02-08 15:22:51 +05:30

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide