palantir/blueprint

Tables' `onVisibleCellChange` reports incorrect row indices.

Open

#3,341 opened on Feb 6, 2019

View on GitHub
 (7 comments) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P2Package: tableType: bughelp wanted

Description

Environment

  • Package version(s): 2.0.0+
  • Browser and OS versions: Tested Chrome on MacOS, seems irrelevant, though

Steps to reproduce

  1. Create a table that needs to scroll
  2. Add an onVisibleCellChage handler
  3. Note the rowIndices values passed to it on startup or scroll. Compare to the actual visible rows.

Example: https://jsfiddle.net/CrossEye/xf5cajyn/

Actual behavior

The rowIndices values do not correspond to the visible rows.

Expected behavior

These should match (with some possible fudging for rows which are only partially visible.)

Possible solution

I'm very new to blueprint. So I don't yet have any suggestions. I will try to dig into it soon, if this is a real bug and not just my own misinterpretation.

Notes

  • The example Fiddle is using table version 2.x. This is happening on the project I just joined in table version 3.2.0. I'm brand new to blueprint, and I couldn't get the Fiddle working with a 3.x. Any suggestions for how to do that would be appreciated. (The bundlers don't seem to get a web-appropriate version.)

  • I have not tested the column indices. But these clearly share a fair bit of code, so it seems quite possible that these are failing too.

Contributor guide