clauderic / react-tiny-virtual-list

A tiny but mighty 3kb list virtualization library, with zero dependencies 💪 Supports variable heights/widths, sticky items, scrolling to index, and more!
https://clauderic.github.io/react-tiny-virtual-list/
MIT License
2.46k stars 165 forks source link

Warnings when using custom prop to force update #59

Open bvisness opened 6 years ago

bvisness commented 6 years ago

I am using a custom prop to force my list to re-render, as recommended in the readme. However, doing so causes me this warning:

Warning: React does not recognize the isScrolling prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase isscrolling instead. If you accidentally passed it from a parent component, remove it from the DOM element.

(my prop is called isScrolling)

bvisness commented 6 years ago

I was able to suppress the warning by naming my attribute data-is-scrolling. It might be nice to mention something about this in the docs.

clauderic commented 6 years ago

👍 Good point. I think having a forceUpdate prop would make sense, this way we could explicitly exclude it from the passthrough props that are passed to the wrapper. If this is something you have time to tackle, I'd be happy to accept a PR to that effect. Otherwise I'll try to get around to it at some point 😅