bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.48k stars 778 forks source link

onClick inside <List /> element doesn't work #759

Closed CopsLikeDonuts closed 3 months ago

CopsLikeDonuts commented 3 months ago

Hey, I spotted problem that onClick element prop in component doesn't work.

My env:

Apple M3 Pro 18 GB macOs Sonoma 14.1

at other envs it works good.

my code:

{Boolean(dataToDisplay.length) && ( <List itemCount={dataToDisplay.length} height={370} itemSize={60} width="100%"

{({index, style}: {index: number; style: CSSProperties}) => { const asset = dataToDisplay[index]; return ( <button onClick={() => onTokenSelect(asset)} className={assetOptionContainer} style={style} onTouchEnd={() => onTokenSelect(asset)} key={index} ....)}})}

Did anyone face with this problem?

kjohn-acx commented 2 months ago

I'm currently having this issue as well

priyanshushh commented 1 day ago

did you found some solution for this ? i am facing a similar issue..