Skip to content

[BUG] Sometimes done() is not working when scroll was not needed #1296

@eugene-g13

Description

@eugene-g13

Describe the bug

				tableVirtuosoRef.current?.scrollIntoView({
					index: nextIndex,
					behavior: 'auto',
					done: () => {
						setCurrentItemIndex(nextIndex);
					},
				});

done: () => { setCurrent...} is not working when table is just focused, first row is selected , but no scroll was actually needed.

Expected behavior

    /**
     * Will be called when the scroll is done, or immediately if no scroll is needed.
     */
    done?: () => void;

Desktop (please complete the following information):

  • OS: iOs
  • Browser Chrome
  • React 18

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions