[GH #204] Does afterChange return physical or visible row/column index?

It is really important to understand when the argument or response is physical vs visible position, but is rarely documented or explained. The afterChange docs do not specify. I’m under the impression this will be the visible position, which is what I observe with rows. But when I reorder the columns and edit a value the column returned is the physical (ie original) position. Is this correct and expected?

Thanks.

Ah, I see on the linked page it says:

2D array containing information about each of the edited cells [[row, prop, oldVal, newVal], ...]. row is a visual row index.

So the row is a visual index, but the column is a physical index?

Hi @jthompson

Thank you for raising this topic. I did the research on this and have found that the internal issue to clarify this is still open. I raised its priority and I will let you know about the correct indexes as soon as I have more information.

Hi @adrian.szymanski

Thanks for looking into it. I am observing the visual row index and the physical column index.

I would like to suggest that the documentation could be greatly improved around this topic, since it’s fundamental to how the table works. I wasn’t even aware of the difference between visual and physical indexes until I observed bugs in my code, and I don’t think this is explained in the docs. I believe I saw the description somewhere else on the forum. I would expect consistency but that’s not the case. For instance, afterChange returns physical column indexes but getColumnMeta requires a visual column index.

@jthompson

Thank you for your feedback. We appreciate it. We also think that some parts of the documentation should be improved in terms of clearness. I hope we will be able to address this problem soon.