React + MetisMenu don't work together properly
See original GitHub issueHello,
I’m using React and after React’s render, I apply MetisMenu.
If React doesn’t render again to update DOM, there is no problem. However, if React renders document more than once, MetisMenu’s onClick references get broken so menu not working.
But actual problem is that applying MetisMenu after every render does not solve the problem because after first applying MetisMenu, it doesn’t let second time. I notice that MetisMenu uses jQuery.data()
and mm
data field to keep plugin values. And to solve the problem, I used this;
$('#menu_container').data('mm',false).metisMenu();
I placed above code to execute after every render of React, and problem solved. But it’s not confortable that’s why I like to note that.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
React + MetisMenu don't work together properly #92 - GitHub
Hello, I'm using React and after React's render, I apply MetisMenu. If React doesn't render again to update DOM, there is no problem....
Read more >Is there a problem in 'react-metismenu-router-link' with react16?
in the use of library 'react-metismenu' there is not problem and work correctly,but this use anchor for selecting item of menu. that is...
Read more >Developers - React + MetisMenu don't work together properly -
React + MetisMenu don't work together properly.
Read more >react-metismenu-router-link - npm
Router link extension for react-metismenu menu component to work with react-router. For full documantion please visit react-metismenu.
Read more >Add active class to li onclick react - Caritas Castellaneta
Put together we have our completed Tab component:You can render a normal html with ... React events do not work exactly the same...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@achapela I looked over my old project for you. I achieved this avoiding render again and for this, I prepared menu part as an external bundle library to make it work independently. However it is not a proper usage. For my new projects I created new menu library just for react recently, you may want to look over it alpertuna/react-metismenu
@alpertuna Sorunu bir de türkçe olarak onokumus@gmail.com adresine yazar mısın?