Skip to content

RowRenderer crashes when ScrollableRange is empty #464

Open
@ghost

Description

Describe the bug
When e.g. all columns of a table are marked as sticky, the scrollable range of the cell matrix can be empty. This causes RowRenderer to crash at

right: (borders.right && column.idx === lastColIdx) || !(state.cellMatrix.scrollableRange.last.column.idx === location.column.idx)

Because cellMatrix.scrollableRange.last.column is undefined.
Admittedly, this is an edge case, but it can happen in our application when the user unselects all non-mandatory columns.

Current behavior
reactgrid crashes when the scrollable range is empty

Expected behavior
I expect reactgrid not to crash

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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