Provide a general summary of the issue here
Tree.tsx loses items if the key is falsy e.g. 0 or ""
🤔 Expected Behavior?
we can use 0 keys, like we do in the Table and 2 months ago
😯 Current Behavior
list items with a falsy key cause multiple list items to dispapear from the list
💁 Possible Solution
I believe it is Introduced here:
5847e26
but definitely upon upgrade 1.15.1 → 1.17.0
the problem is here:
|
node = key ? this.getItem(key) : null; |
the could should be:
node = key != null ? this.getItem(key) : null;
🔦 Context
No response
🖥️ Steps to Reproduce
I can put together a repro case if necessary
Version
1.17.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Linux
🧢 Your Company/Team
Saxo Bank
🕷 Tracking Issue
No response
Provide a general summary of the issue here
Tree.tsx loses items if the key is falsy e.g. 0 or ""
🤔 Expected Behavior?
we can use 0 keys, like we do in the Table and 2 months ago
😯 Current Behavior
list items with a falsy key cause multiple list items to dispapear from the list
💁 Possible Solution
I believe it is Introduced here:
5847e26
but definitely upon upgrade 1.15.1 → 1.17.0
the problem is here:
react-spectrum/packages/react-aria-components/src/Tree.tsx
Line 117 in edc24b0
the could should be:
🔦 Context
No response
🖥️ Steps to Reproduce
I can put together a repro case if necessary
Version
1.17.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Linux
🧢 Your Company/Team
Saxo Bank
🕷 Tracking Issue
No response