Skip to content

[combobox] Predicate function for autoHighlight #5205

Description

@vladmoroz

Feature request

Would like to have a way to decide on the fly whether the first filtered item should be highlighted.

Currently we accomplish this via a bun patched version of the Combobox where autoHighlight accepts a function like (item) => boolean

Screen.Recording.2026-07-10.at.18.18.49.mov

In Paper this is so that if you are typing in a value into the input, we highlight theme tokens only for exact matches, otherwise the value is treated like normal text.

For the user it means that if they type "1" and press Enter they wouldn't get a token for "12", but if they type in "12" and a matching token exists, that one is selected on Enter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: comboboxChanges related to the combobox component.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions