primefaces / primefaces/primereact
DataTable filterDisplay lose focus: DataTable filterDisplay="menu" modal lose onFocus status as soon as you type something
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
DataTable filterDisplay loses focus: DataTable filterDisplay="menu" modal looses onFocus status as soon as you type something.
This happen specifically when a Table starts after some content on top as per my example. I tried scrolling into top view when we click the input element but it keep losing focus.
Go to codesandbox link example from your mobile device
https://xdl56w.csb.app/
(Not the chrome inspector) because the error happens when we have any sort of keyboard.
Press any menu that has text input.
https://github.com/primefaces/primereact/assets/151073541/1d764cee-0e0e-4aa3-8035-eb760bef1587
Reproducer
PrimeReact version
10.2.1
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Non specific (Happens in all browsers)
Steps to reproduce the behavior
Go to codesandbox link from your mobile device
https://xdl56w.csb.app/
(Not the chrome inspector) because the error happens when we have any sort of keyboard.
Press any menu that has text input.
Expected behavior
The modal shouldn't close on text input change
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and its /src/App.tsx on a mobile device, then open a DataTable filter menu containing a text input. Confirm the focus loss while typing and use the expected behavior as the completion check: the modal remains open and the input retains focus when its text changes.
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
- 45/100