Luckysheet icon indicating copy to clipboard operation
Luckysheet copied to clipboard

[BUG]Two luckysheet.create() in a single HTML page impossible

Open d01010101 opened this issue 3 years ago • 4 comments

Describe the bug If more than single call to luckysheet.create(), each for a separate div, all these divs in one page, only one create() actually has effect.

What is expected? Possibility of having multiple spreadsheets in a page, e.g. with selectable tabs.

d01010101 avatar Mar 23 '21 23:03 d01010101

Hey there! Any tips or hints on how to create two or more luckysheet instances in one page. Currently trying this but with no luck:

let dspSpreadsheets = arrayOfSpreadsheetsConfigs;

dspSpreadsheets.forEach((spreadsheet) => {
    <div id=`luckysheet${spreadsheet.id}` style="width: 0; height: 0;"></div>
});

dspSpreadsheets.forEach((spreadsheet) => {
    window.luckysheet.create(
        spreadsheet.config
    );
});

Thank you!

Edit: @mengshukeji

lacieri avatar Oct 15 '21 18:10 lacieri

Is there any solution for the above query?

Thank you.

ProfessionProgrammer avatar May 12 '22 07:05 ProfessionProgrammer

No idea, maybe the new version: https://github.com/ruilisi/fortune-sheet

d01010101 avatar May 19 '22 16:05 d01010101

"multiple instance on the same page is supported"

d01010101 avatar May 19 '22 16:05 d01010101