How to properly Bootstrap Modals & Menu in Vue JS.

Hi,

I've added few modals using the the ways mentioned in the docs, using bootstrap.js & modal.js (I guess the one came with the template).

So the issue is I'm using a drop down menu o my datable. for actions, if the datatable is empty during the first load, after changing the parapets and getting new data, the menu button isn't working... I tired loading the data to the table with params with data, then the menu does work. basically when the main component mounts if there is no data in the Datable the Menu doesn't work..even after data is fetched..why so

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,

Since the menus are initialized on page load but the content of the table is rendered asynchronously you have to reinitialize our MenuComponent then your data is received.

MenuComponent.reinitialization();

I'll try that thank you. For the time being as a workaround I'm using dropdown from the Element Plus.

Is this the same case for normal modal only? I've a modal/Dialog with form, I've two select boxes there, the 2nd select boxes data will be based on the first one's selection, I did the logic and all, and the data mapped to the second select box changes in my Vuex and all, but it's not getting reflected on the UI. (re-render not happening). Can I use the same solution here?

Hi,

No this is only a case for our custom components located in assets/ts folder.

Bootstrap modals and the Element Plus components don't require additional initialization.

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  :(