Open MEDASSSSSSS opened 1 year ago
Just run into the same issue!
For anyone who may run into the same problem, check if there's any state updating when you typing in an input.
DO NOT manage input values by an state. Instead you need an Form
(for example: antd) to manage input value.
There is a input in every row, and the value of input is controlled by the list data. After onchange event of the input in row is triggered, the list data is updated, and the list scroll up with some random height. After some debugger, I only found the onscroll event is triggered unexpected, then List component will update because of this event. But I don't know why the scroll event is triggered under I didn't do anything to scroll the list.
Here is the demo: https://codesandbox.io/s/react-window-input-onchange-issue-lsoj3h?file=/index.js