Skip to content

Setting "display:none" on ListView parent crashes the page #6298

@bmingles

Description

@bmingles

Provide a general summary of the issue here

If I set "display:none" on a parent element of a ListView, it crashes the page.

<div style={{ display: "none" }}>
    <ListView items={items}>
        {(item) => <Item key={item.id}>{item.name}</Item>}
    </ListView>
</div>

Possibly related to #6181

🤔 Expected Behavior?

ListView should not throw errors if parent is hidden.

😯 Current Behavior

ListView throws errors when parent is hidden.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/list-view-zero-height-forked-jr8h3h

Version

^3.34.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions