react-spectrum
react-spectrum copied to clipboard
Setting "display:none" on ListView parent crashes the page
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 https://github.com/adobe/react-spectrum/issues/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