ce icon indicating copy to clipboard operation
ce copied to clipboard

Move row bug ( merged row function and move row function).

Open TsePakKwan opened this issue 7 years ago • 3 comments

hi @paulhodel , I try to use jexcel v3 merge function and move row function, then find two bug as below.

  1. has colspan merged row move to other row.(this action should affect merged row). but this action does not show confirm message then and merged cell. then, some cell will affect to cannot edit. (below example cell C1 and D1) https://jsfiddle.net/tsepakkwan/0xucfrah/12/ x2

2.Move row to the has merged cell row (this action should not affect merged row). but this action will show confirm message then destroy merged cell. https://jsfiddle.net/tsepakkwan/0xucfrah/11/ 1562818765189

I think show this confirm message then destroy merged cell should be check below condition.

  1. Destination row is merged row? if 1 is true, check this action is it affect merged row. for example, A1: col span 3, row span 2. Move row 10 to row 1 is not affect merged row, so not need to show this confirm message. A1: col span 3, row span 2. will be change to A2: col span 3, row span 2. However, in same case move row 10 to row 2 or row 3 will affect merged row,so need to show this confirm message.

  2. Move row is merged row? if 2 is true, check that col span is greater than or equal to 2 , both true then show confirm message.

TsePakKwan avatar Jul 11 '19 05:07 TsePakKwan

I have a similar issue. If I delete a row(s) containing merged cells, the confirm box comes up and then all merges in the table are destroyed. I think it should only destroy merges in the row(s) being deleted. (Note that all merges remain intact if the row being deleted contains no merged cells.)

I did locate the code that causes this behaviour, and it appears to be acting as coded. I'm just wondering why it was coded this way. It starts at line 3473 in the version I have:

if (mergeExists) { if (! confirm(obj.options.text.thisActionWillDestroyAnyExistingMergedCellsAreYouSure)) { return false; } else { obj.destroyMerged(); } }

dana-crypto avatar Feb 04 '20 20:02 dana-crypto

I will take a look at that soon. Any fix will be included in the next release.

pphod avatar Feb 04 '20 22:02 pphod

That has been fixed on v4+ all distributions.

pphod avatar Dec 28 '20 21:12 pphod