I have a action menu in a datatable as in the demo, but i set the responsive to true. So when the actions menu is on responsive view on click dont show the menu.
Im working with ajax server side and i use
drawCallback : function(){ KTMenu.createInstances();
table.on("responsive-display", function(e, datatable, row, showHide, update) {
if (showHide) {
KTMenu.createInstances();
}
});
Hi
Can you try to delay the reâinitialization call—this allows the responsive row markup to finish rendering before KTMenu runs. You can try wrapping your call in a small timeout. For example:
table.on("responsive-display", function(e, datatable, row, showHide, update) {
if (showHide) {
setTimeout(() => {
KTMenu.createInstances();
}, 100); // try 100ms; adjust if needed
}
});
Thank you very much. I don't know why I didn't think of this before.
Glad it worked.
Thanks