flights.Hot.hot.getDataAtCol(3)
(20) ["BA2696", "AT803", "BA2762", "BA2578", "BA2708", "BA2273", "BA2652", "TK1998", "D82856", "EZS8478", "DY7015", "EZY8725", "EZY8611", "SU2589", "BA2944", "EZY895", "EZY8719", "UX1016", "EZY8553", "EZY8879"]
flights.Hot.hot.getSourceDataAtCol(3)
(20) ["BA2696", "AT803", "BA2762", "BA2578", "BA2708", "BA2273", "BA2652", "TK1998", "D82856", "EZS8478", "DY7015", "EZY8725", "EZY8611", "SU2589", "BA2944", "EZY895", "EZY8719", "UX1016", "EZY8553", "EZY8879"]
As you can see… both methods return the same thing, but, after ordering one of the columns in the table I get the following:
flights.Hot.hot.getDataAtCol(3)
(20) ["BA2696", "AT803", "BA2762", "BA2578", "BA2708", "BA2652", "D82856", "DY7015", "BA2944", "UX1016", "BA2273", "TK1998", "EZS8478", "EZY8725", "EZY8611", "SU2589", "EZY895", "EZY8719", "EZY8553", "EZY8879"]
flights.Hot.hot.getSourceDataAtCol(3)
(20) ["BA2696", "AT803", "BA2762", "BA2578", "BA2708", "BA2273", "BA2652", "TK1998", "D82856", "EZS8478", "DY7015", "EZY8725", "EZY8611", "SU2589", "BA2944", "EZY895", "EZY8719", "UX1016", "EZY8553", "EZY8879"]
SourceData order is not being synced with what’s visible on the table.
This affects me because I have the following piece of code which is fired at afterChange
event
changes.forEach(([row, field, oldVal, newVal]) => {
if (this.nothingChanged(oldVal, newVal)) {
return;
}
changed = true;
const id = this.hot.getSourceDataAtRow(row).id;
And because row
is what’s visible on the table (and id
is not shown in the table, therefore not gettable with getDataAtRow
) I’m getting incorrect data.
Is this intended behaviour or a bug?