Luckysheet [BUG]create()/destroy()/create() changes vertical scrollbar position

moiiocjp  于 5个月前  发布在  其他
关注(0)|答案(3)|浏览(71)

If an existing instance of Luckysheet is destroyed and then recreated with options containing new spreadsheet data, the new spreadsheet is scrolled to the bottom.

vaqhlq81

vaqhlq811#

I tried this as a workaround:

luckysheet.destroy();
luckysheet.create(options);
setTimeout(function() { luckysheet.scroll({scrollWidth:0,scrollHeight:0}); }, 700);

but it does not seem to work.

yzxexxkh

yzxexxkh2#

It turned out, te bug is in another place. There was a value in the options "scrollTop": 300 but I did not notice it, because it did not have any effect after the first create() . It works, however, after destroy(), create() .

bfnvny8b

bfnvny8b3#

Hi~ destroy() / create(). It never creates a new sheet. the value is in the cells.

How do you do? @d01010101

相关问题