Skip to content

How to obtain currently focused item? #4496

@NullPainter2

Description

@NullPainter2

Hello,

I need to find value (or ID or index) of currently focused item and use it inside of a custom Input.

Can't use Select.onChange because it is not fired when focused item changes.

I could hack around it by sampling Option.isFocused and pray it would not cause any problem, but I wonder if there is a better way.

EDIT: Reason why I am doing this is to create localized a11y message which informs about currently chosen option.

Thanks for help :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions