Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filterInputAutoFocus: Not focusing the right input #5842

Closed
jerlam06 opened this issue Jan 26, 2024 · 2 comments
Closed

filterInputAutoFocus: Not focusing the right input #5842

jerlam06 opened this issue Jan 26, 2024 · 2 comments
Labels
Status: Needs Reproducer Issue needs a runnable reproducer

Comments

@jerlam06
Copy link

Describe the bug

At the load of the form/page, when filterInputAutoFocus is true on the dropdown and multiselect component, the very first input in the page is autofocused instead of the search input of the said components.

Reproducer

No response

PrimeReact version

10.2.2

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@jerlam06 jerlam06 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 26, 2024
@melloware
Copy link
Member

Hmmm I can't reproduce they are both doing this:

        const onEntered = () => {
            props.onEntered(() => {
                if (props.filter && props.filterInputAutoFocus && filterInputRef.current) {
                    DomHandler.focus(filterInputRef.current, false);
                }
            });
        };

Which has a REF to the filter input and focuses it when the Panel is opened up?

@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 26, 2024
Copy link

Please fork the CodeSandbox project or Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Reproducer Issue needs a runnable reproducer
Projects
None yet
Development

No branches or pull requests

2 participants