Skip to content

Pass maintainVisibleContentPosition through to calendar-list #2759

@siggi-livekindred

Description

@siggi-livekindred

Problem

A component with large days (month height > const CALENDAR_HEIGHT = 360) or variable sized months still has janky scrolling.

Previously reported in #1881 but closed as stale.

Solution

Providing maintainVisibleContentPosition to the FlatList fixes this issue, at least in my case

        <CalendarList
            ...
            maintainVisibleContentPosition={{
              minIndexForVisible: 0,
            }}
       />

This is already a prop on CalendarList, inherited and not omitted from FlatListProps.

Ask

Update the component to pass through the maintainVisibleContentPosition prop.

Jumping visualized

repro.mov

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