Hi @OvidijusParsiunas ,
When using the the 'cell-update' event listener:
While visually the last row of the table is always the one to be actually removed, the rowIndex should point to the original row in the data source, so in case we use "Sort Ascending"/"Sort Descending" we can still track the logical row that was deleted.
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected]/dist/activeTable.bundle.js" type="module"></script>
</head>
<body>
<active-table id="at"
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326]]'
></active-table>
<script>
var tableElementRef = document.getElementById("at");
tableElementRef.addEventListener('cell-update', (cellUpdate) => {
console.log(cellUpdate.detail);
});
</script>
</body>
</html>
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too