Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

After applying fixed column to the database, popup menu is opening behind the below action button.


I am applying fixed column to the datatable by


fixedColumns: {
left: 0,
right: 1
},



It worked but when clicked on the actions button, a menu popup was hidden behind the below action button. I have tried initializing menus as below


datatable.on("draw", function () {
KTMenu.createInstances();
});

but still did not work, It only worked when the fixed column was removed.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi Megha,

Instead of initializing the menu immediately after the "draw" event, try adding a slight delay before initializing the menu. This delay might ensure that the fixed column has fully rendered before the menu is initialized.

datatable.on("draw", function () {
setTimeout(function () {
KTMenu.createInstances();
}, 100); // Adjust the delay as needed
});


Thanks



Hi,

This can happen because the fixed column has a higher z-index than the popup menu, causing it to appear on top.

Increase the z-index of the popup menu:
This is the most straightforward solution. You can increase the z-index of the popup menu CSS style to ensure it appears above the fixed column.

.dropdown-menu {
z-index: 1000; /* Increase z-index to a higher value than the fixed column */
}

There might be a bug in the specific datatable library you're using that causes the popup menu to be hidden. Consider upgrading the datatables.net version.

Thanks



No, it is not working. Data is loaded by Ajax. and the menu was reinitialized after data loading. I am not sure if Ajax data loading is causing the issue or not.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(