glebovpavel / IR_to_MSExcel

Oracle Apex plugin for Interactive Grid or Interactive Report
http://glebovpavel.github.io/Description_IR_TO_XSLX/
Other
39 stars 14 forks source link

APEX 19.2: XLSX buttons keeps adding to the download dialog in IG, if there are more than one IG on a page #107

Open lyoup opened 1 year ago

lyoup commented 1 year ago

Hi Pavel,

If there are more than one interactive grid on a page, each time the "Download" dialog is opened in a new grid, more XLSX buttons are added. First time we have 1 button (OK), in a second grid there will be 3 buttons, calling download again in the first grid will show 4, calling from another grid adds 4 buttons etc. The number of buttons is growing until they are shown outside the dialog and cover all the screen...

I tried to fix the code IG2MSEXCEL.js adding $("button").remove(".ir-to-ms-excel-button"); before the section where a new button is appended in the function addDownloadXLSXiconToIG, but it only helped to create only one button on each call (so it is not a Fibonacci sequence).

Best regards Natalia

lyoup commented 1 year ago

fixed by modifying the command which clones the button:

var $button = $(".ui-button--hot:first").clone();

instead of

var $button = $(".ui-button--hot").clone();