adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.6k stars 1.09k forks source link

Re-rendering the entire list of elements (ComboBox list) #6981

Open EvgenPan opened 2 weeks ago

EvgenPan commented 2 weeks ago

Provide a general summary of the issue here

Every time you hover over item in the list, all items are redrawn.

🤔 Expected Behavior?

Updating the item you hovered over.

😯 Current Behavior

Every time you hover over item in the list, all items are redrawn.

Знімок екрана 2024-08-30 о 16 49 40

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

-

Version

version 1.3.3

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

If other, please specify.

No response

What operating system are you using?

macOs

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

LFDanLu commented 1 week ago

This looks to be in the same vein as https://github.com/adobe/react-spectrum/issues/5897. Are you seeing a heavy performance hit?

EvgenPan commented 1 week ago

Yes, this becomes a huge problem when we have 2000 items @LFDanLu

snowystinger commented 1 week ago

Ah, you aren't virtualizing by any chance are you?

EvgenPan commented 1 week ago

@snowystinger Yes, sure.

LFDanLu commented 1 week ago

As @snowystinger alluded to, the performance hit can mitigated by virtualizing the combobox list, something we are hoping to support in a stable manner soon. For now, you can try using the UNSTABLE_Virtualizer like in this rough sandbox: https://codesandbox.io/p/sandbox/pedantic-black-vrd8rh

EvgenPan commented 4 days ago

@LFDanLu this solution doesn't work (

LFDanLu commented 4 days ago

@EvgenPan Mind expanding on what didn't work?