Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Dismiss dropdown menu


Hi,

Is there a preimplemented way to close a dropdown menu on button click?

For example, on metronic react demo 2 notification logs, I'd like to close the menu when clicking on View all. What would be the best way to do this?

Best wishes,
Tamás


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 (9)


Hi happy,

Can you try to use the HTML attribute the view all links?

"data-kt-menu-dismiss='true'"

Regards



Hi Sean,

That worked wonderfully. Thanks!
Is there anywhere I can see all the available attributes for future reference?

Best,
Tamás



Hi,

At the moment we do not have a separate components doc for React version, but usage and attribute names should be the same as they are in the HTML version.

You can refer to our HTML version doc.



Thanks Lauris, got it.

Another question I had based on this, is how could one conditionally change some text based on the opened or closed state of an accordion elemenet?



You can add new styles to your component and then modify tag content depending on the accordion state.


.accordion-button.collapsed:before {
content: "more"
}

.accordion-button:before {
content: "less"
}



There's a possibility that it could be related to cached data. To troubleshoot this, could you please try clearing your browser cache and then revisiting the demo URL
Read more: https://devs.keenthemes.com/question/dismiss-dropdown-menu-backrooms game



Dive into the exhilarating world of blackjack with our comprehensive guide. From the basics of gameplay to advanced strategies, we cover everything you need to know to become a master of the game. Whether you're https://www.ardijah.co.nz/payments/mastercard/ a novice player or a seasoned pro, our article provides valuable insights and tips to help you maximize your chances of success at the blackjack table. Join us as we explore the timeless allure of this classic card game.



Hi to all! Are you looking for excitement and entertainment without leaving your home? Introducing https://sizzlinghot-spot.com/kasyno-online/ online casino, the best place for gambling lovers! The excitement never ends at this site with a wide selection of casino games, from slots to roulette and live poker. In addition, it offers tempting welcome bonuses and interesting promotions that will increase the level of adrenaline. Join the fun and excitement at sizzlinghot spot online casino today!



Halo semuanya! Apakah Anda ingin berjudi langsung di perangkat Anda? 1Win menawarkan aplikasi unik yang akan mengubah ponsel cerdas Anda menjadi kasino perjudian sungguhan! Instal aplikasi kami dan benamkan diri Anda dalam dunia taruhan yang menarik kapan saja dan di mana saja. Taruhan cepat, permainan realistis, dan antarmuka yang ramah pengguna - semua ini ada di aplikasi 1Win. Unduh sekarang di https://1win-bet.id/app/ dan mulailah menang hari ini!


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