Skip to content

It is need to know when menu will be rendered and had position #748

Open
@Viktor-the-great

Description

@Viktor-the-great

first of all sorry for my english

Input field is inside menu (Dropdown.Menu). There is a lot of text in front of the input field. Set focus on input field when menu is mounted. Menu has not yet received a position, so the page is scroll to the beginning (menu is hidden and is at the very top of the page).

I am now using timeout to fix it.
In demo scroll to bottom. There are two input button to open dropdown. Page scrolls up when first button is pressed. Second button use setTimeout to wait when menu get position.

I suggest using onCreate, onUpdate of Popper.js to solve this problem, and for this to pass these functions to the constructor (usePopper hook)

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