With reference to Nested rows support
Does handsontable provide any property to merge cells according to duplicate value of typical cell?
Does handsontable provide any property to merge cells according to duplicate value of typical cell?
Hi @tmoore can you share a draft? I am not sure if I correctly visualize the end result.
As I assume you’re looking for a logic that will automatically merge adjacent cells that share the same value?
Hi aleksandra_budnik,
You are visualizing it correctly, I tried merge-cells functionality of handsontable. But for that we need to maintain merge cells object for each insertion/deletion of row. So to avoid that is there any other functionality to club that cell according to duplicate data in adjacent call?
I am afraid that it won’t be easy. You would need to use updateSettings
method in an afterChange
hook to change the mergeCells
array. It can be pretty easy when you merge only two cells together. The problem may appear when you already have some merged areas. Then you’ll need to watch the rowspan
and colspan
parameters.
For that I also need to update each merge cell object which is having row parameter value greater than selected row index. That is like iterating through each merge cell to update span, so is there any another solution to update it?
I think that the only way is to create a method that will return an array of object the same as mergeCells and just update it via afterChange hook. It will rerender the whole table but