please suggest how can i achieve validation after delete row also
After removing row by context menu, all red highlights changes positions rather than being on duplicate rows
Hey @shanksachan
you can try to load this logic into a function and call it via afterRemoveRow
and afterCreateRow
hook. If you enable row moving you should also consider adding afterRowMove
.
I do not have any demo I can use and rebuilding your demo will take some time. You need to create an external method that you can call in all the hooks: afterChange
, afterCreateRow
, afterRemoveRow
. Now it is impossible as you refer to the data via afterChange
parameter. You need to keep it global.
So you don’t use
var changeLen = changes.length;
but you iterate the rows
var changeLen = hot.countRows()
As you’re making it global you just use hot
and skip this var hotInstance = this;