Skip to content

Feature request: Pass highlightedIndex as a parameter to scrollIntoView function #1629

@baseten

Description

@baseten

Problem description:

Using downshift with list virtualizing libraries breaks auto scrolling with circular navigation.

Having downshift attempt to auto find the relevant dom node from highlightedIndex is helpful, but obviously with virtualization there will be no matching element.

React Virtuoso, for example, provides its own scrollIntoView API based on index, and while downshift supports passing a custom scrollIntoView function as a prop, which could facilitate this connection, it's not possible to access highlightedIndex from this callback.

Suggested solution:
Passing highlightedIndex as a third argument to scollIntoView (potentially via an options object), would allow the consumer to implement the custom logic necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions