Warning: `NaN` is an invalid value for the `width` css style property.
There was a mistake in our code, where resetAfterColumnIndex was being called with the index value of NaN. Which resulted in lastMeasuredColumnIndex being set to NaN, since the typeof index === "number" check passes for NaN and it snowballs to style.width for the innerElementType also being computed as NaN.
This is clearly incorrect api usage, but should there be some check for this or a separate warning, since the resulting react warning (the "style.width is NaN") is fairly misleading on the cause of the issue?
Recently run into an issue with a console warning
There was a mistake in our code, where
resetAfterColumnIndex
was being called with the index value ofNaN
. Which resulted inlastMeasuredColumnIndex
being set toNaN
, since thetypeof index === "number"
check passes forNaN
and it snowballs tostyle.width
for theinnerElementType
also being computed asNaN
.https://github.com/bvaughn/react-window/blob/6ff5694ac810617515acf74401ba68fe2951133b/src/VariableSizeGrid.js#L448-L468
This is clearly incorrect api usage, but should there be some check for this or a separate warning, since the resulting react warning (the "style.width is NaN") is fairly misleading on the cause of the issue?