primefaces / primefaces/primereact
MultiSelect: Uncaught ReferenceError: filter is not defined
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
When we open the MultiSelect and press Tab key there is an error in console Uncaught ReferenceError: filter is not defined.
It comes from the https://github.com/primefaces/primereact/blob/prod/components/lib/multiselect/MultiSelect.js line 280 hide(filter)
Filter variable is undefined and also hide function doesn't take any parameters (line 534)
It casues the issue that MultiSelect dropdown is not closed after tabbing to the next form element from it.
After removing locally filter parameter from the line 280, everything works fine.
Reproducer
No response
System Information
System:
OS: Windows 11 10.0.26100
CPU: (6) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz
Memory: 10.79 GB / 31.87 GB
Binaries:
Node: 20.10.0 - C:\Program Files\NodeJS 20.10.0\node.EXE
npm: 10.2.3 - C:\Program Files\NodeJS 20.10.0\npm.CMD
Browsers:
Chrome: 141.0.7390.123
Edge: Chromium (141.0.3537.71)
Firefox: 143.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.26100.1882
npmPackages:
primereact: ^10.9.6 => 10.9.6
react: 19.1.0 => 19.1.0
Steps to reproduce the behavior
- Open MultiSelect dropdown
- Mark some option for example with with arrows and space
- Press Tab
Expected behavior
No errors, MultiSelect dropdown is closed after pressing Tab
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 in components/lib/multiselect/MultiSelect.js around line 280 and inspect the hide function near line 534. Reproduce the Tab-key flow described in the issue, then verify that it closes the dropdown without a console error and does not regress option selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100