primitives icon indicating copy to clipboard operation
primitives copied to clipboard

fix: Select should not crash if getItems returns empty array

Open benj-dobs opened this issue 1 year ago • 3 comments

Description

  • Fixes #1795 (confirmed to fix reproduction at https://github.com/radix-ui/primitives/issues/1795#issuecomment-1705308325)
  • Fixes #2535

I have not added tests because I couldn't make the simple reproduction case from #2535 work in the test environment. I could reproduce it in Storybook, but this seemed like an odd thing to add to Storybook, so I didn't.

It's possible this solution is incomplete, but it fixes both of the above reproductions, so it's probably good enough for now.

benj-dobs avatar Jan 03 '24 14:01 benj-dobs

Hi. I am facing a similar crash on a use case similar to the one of https://github.com/radix-ui/primitives/issues/2535 I think that this fix make sens

maxired avatar Jan 05 '24 11:01 maxired

Our customers hit this error every single day. Is it possible to get this merged? Also happy to help out with this PR if it needs changes

izhan avatar Feb 06 '24 00:02 izhan

In case anyone else is wondering about how maintainer activity seems to have just died without a word, there are some signs of life on the Discord:

https://discord.com/channels/752614004387610674/803656831704629298/1199950373650190336

No idea when this issue will get fixed but for now using patch-package or yarn resolutions is probably your best workaround.

benj-dobs avatar Feb 12 '24 10:02 benj-dobs

We're also facing this issue. Going the patch-package route for now but it'd be great to merge this in

tomtomprince avatar Aug 07 '24 13:08 tomtomprince

Hey all! I'm back on the team and will be reviewing some old PRs, cleaning up the backlog in the coming weeks. This one's first on the list. Thanks for hanging with us 🙏

chaance avatar Aug 09 '24 23:08 chaance