-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Description
There is an inconsistency in the API related to how column and row indexes are passed or returned in specific methods.
Some methods (for example: selectCell) provide or expect only the column/row index, rather than the original column identifier.
This causes issues when the grid’s internal state changes, such as when columns are pinned.
As a result, the indices can differ from the original ones that were passed into the grid, and it becomes impossible to determine from the outside which column index refers to.
Issue Details
- There is no reliable way to map the given index back to a specific column outside the grid.
- This makes it difficult to synchronize or manage external state related to columns.
Expected Behavior
The API should provide a consistent way to identify columns, regardless of internal reordering.
Actual Behavior
When the grid updates its internal state (due to sorting, pinning, etc.), previously valid indexes no longer refer to the same columns or rows, breaking external logic that relies on them.
Example
- Pass data with three columns: A, B, C.
- Pin column B.
- Call s
electCell({idx: 2, rowIdx: 1);
Expected behavior: selected 1st cell of the pinned column B
Current behavior: selected 1st cell of column A
Suggested Fix
Standardize the API to use original column indices
Could you help us solve the issue or suggest an alternative approach to nail it?