marmelab / marmelab/react-admin

react-hook-form@7.55 breaks list search filter with react@18.2

Open
#10,656 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

v4
Dominant language
TypeScript
Stars
26.9k
Forks
5.5k
Avg merge
2d 3h
Merged PRs (30d)
19

Description

**What you were expecting:**
Search filter input of list view works as documented.

**What happened instead:**
Search filter input crashes browser once it gets focused.

**Steps to reproduce:**
Focus search filter input ("q").

**Related code:**
Just use sample code from React-Admin's "Get started".

**Other information:**
Issue was introduced after upgrading to react-hook-form@7.55
Seems to be major upgrade which requires react@^9.0.0
As workaround, use override in your project's package.json:

"overrides": {
"react-admin": {
"react-hook-form": "~7.54.0"
}
},

**Environment**

* React-admin version: 4.16
* Last version that did not exhibit the issue (if applicable):
* React version: 8.2
* Browser: Chrome, Edge
* Stack trace (in case of a JS error):

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the React-Admin “Get started” sample and reproduce the crash by focusing the list search filter input named “q” in Chrome or Edge. Compare the behavior with react-hook-form@7.55 and the documented workaround using ~7.54.0. Done means the search filter focuses and works without crashing under the supported React-Admin 4.16 dependency setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.