Skip to content

GridElement should provide a method to scroll to a specific column #8046

@haenni

Description

@haenni

Describe your motivation

We have test cases, where we loop through all cells of a row and check if they hold a certain value.

If the grid is wide and its columnRendering property is set to lazy, the cells of columns that are out of view will only render when scrolling them into view.

Calling GridTRElement#getCell(GridColumnElement column) with a column as argument that is out of view will return null. So we can not tell if the cell is actually null or if it is just out of view and not rendered.

Describe the solution you'd like

It would be good if GridElement provided a method like scrollToColumn(GridColumnElement column) that scrolls the column horizontally into view.

Describe alternatives you've considered

setting the grid property columnRendering to eager inside the test. But this alters the component under test and should therefore be avoided

Additional context

Vaadin 24.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions