Skip to content

RAC ComboBox option to select on item focus #5681

@frontsideair

Description

@frontsideair

Provide a general summary of the feature here

I'm building a search autocomplete and I want it ti behave similarly to Google/Amazon where highlighting an item to select it automatically.

I see that there's a SearchAutocomplete component in the works but it doesn't seem public yet. (And I assume it's Spectrum only so I have to wait for it to land to RAC.) The second easiest would be to have a prop that allows selection by focus. The third would be to expose an event handler that's called with highlighted key.

I'd go lower level with the hooks path but highlighted item doesn't seem to be exposed there either.

🤔 Expected Behavior?

There should be some way to use listbox highlighted item.

😯 Current Behavior

I couldn't find any way to access highlighted item.

💁 Possible Solution

No response

🔦 Context

Building a search autocomplete component.

💻 Examples

google.com
amazon.com

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions