Giter VIP home page Giter VIP logo

Comments (20)

PTC-JoshuaMatthews avatar PTC-JoshuaMatthews commented on May 25, 2024 5

Please fix this! The fix from slimsoft from over a year ago works, why hasn't it been integrated? I don't want to edit a node module!

from metismenu.

pereiradiogo avatar pereiradiogo commented on May 25, 2024 1

Hi!
Hava the problem solved in this branch: https://github.com/pereiradiogo/metismenu/tree/fix_parent_menus

@onokumus Check de PR

from metismenu.

serloal avatar serloal commented on May 25, 2024

I have the same problem, I tried the new version 2.0.0 and the behaviour is the same in all versions.

Thanks.

from metismenu.

pballester avatar pballester commented on May 25, 2024

+1, please can you fix it?

Thanks in advance!

from metismenu.

Zephyrante avatar Zephyrante commented on May 25, 2024

Same here! Any fixes?

from metismenu.

jirapatj avatar jirapatj commented on May 25, 2024
<ul id="sidebar-left-menu">
   <li data="{autoShowFlg:0,menuUnder:''}" id="LSMS04000000">
      <a href="javascript:addNewTab('Admin','user.action',300)">
      <i class="glyphicon glyphicon-chevron-right"></i>&nbsp;&nbsp;
      <span class="sidebar-link1">ADMIN</span>
      </a>
      <!-- Sub menu -->
      <ul class="collapse" style="height: 0px;">
         <li data="{autoShowFlg:0,menuUnder:'LSMS04000000'}" id="LSMS04100000">
            <a href="#">
            &nbsp;&nbsp;<i class="glyphicon glyphicon-chevron-right"></i>&nbsp;&nbsp;
            <span class="sidebar-link1">MANAGEMENT</span>
            </a>
            <!-- Sub menu -->
            <ul class="collapse" style="height: 0px;">
               <li data="{autoShowFlg:0,menuUnder:'LSMS04100000'}" id="LSMS04110000">
                  <a href="javascript:addNewTab('Role Group','roleGroup.action',300)">
                  &nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-chevron-right"></i>&nbsp;&nbsp;
                  <span class="sidebar-link1">ROLE GROUP</span>
                  </a>
               </li>
               <li data="{autoShowFlg:0,menuUnder:'LSMS04100000'}" id="LSMS04120000">
                  <a href="javascript:addNewTab('Role','role.action',300)">
                  &nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-chevron-right"></i>&nbsp;&nbsp;
                  <span class="sidebar-link1">ROLE</span>
                  </a>
               </li>
               <li data="{autoShowFlg:0,menuUnder:'LSMS04100000'}" id="LSMS04130000">
                  <a href="javascript:addNewTab('User','user.action',300)">
                  &nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-chevron-right"></i>&nbsp;&nbsp;
                  <span class="sidebar-link1">USER</span>
                  </a>
               </li>
            </ul>
         </li>
      </ul>
   </li>
</ul>

I have same problem. Sub of sub menu is not collapse when I click root menu to close toggle.

from code when I click menu "Admin" and click "MANAGEMENT". After that I click Admin for toggle close of all the menu "MANAGEMENT" level is toggle close. But "ROLE GROUP, ROLE, USER" is not close toggle.

Could you please fix that?

update : from version 1.1.3 i change from
$(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide");
to
$(this).parent("li").find('li').removeClass("active").children("ul.in").collapse("hide");

from metismenu.

laszlof avatar laszlof commented on May 25, 2024

Same problem here. I'm using this with ember.js which uses single page routing, the toggle function does not work. Any fix for this?

Also. Going directly to a hash based route (http://dom.com/#/some/route) causes the menu to be fully expanded on load. Not sure if this is an issue with my setup, or with the plugin itself.

from metismenu.

laszlof avatar laszlof commented on May 25, 2024

I managed to fix the specific problem I was having by adding another "click" listener for the sub menu links.

    this.$element.find('li').not(':has(ul)').children('a').on('click.metisMenu', function() {
      if ($this.options.toggle) {
        var $parent = $(this).closest('ul.in');
        $this.hide($parent);
      }
    });

As for my second issue, it actually came down to having some matching (temporary) links that were going to "#", which matched the current page, so the plugin was marking them "active" and expanding the groups. Not really an issue with the plugin itself.

from metismenu.

lenamtl avatar lenamtl commented on May 25, 2024

+1

from metismenu.

slimsoft avatar slimsoft commented on May 25, 2024

Hi, here is a listener to inject into metisMenu which works fine.

var that = this;
this.$element.children('li').not(':has(ul)').children('a').on('click.metisMenu', function(e) {
  if ($this.options.toggle) {
    var $parent = that.$element.find('ul.in');
    $this.hide($parent);
  }
});

from metismenu.

jujoramos avatar jujoramos commented on May 25, 2024

Hello there,

I'm having an issue similar to the one reported by @laszlof and I haven't been able to find the solution yet. I doesn't matter how deep the menu is, when the url ends with a hashtag (http://localhost/myApp/# as an example) the entire menu is fully expanded on load. Any thoughts on how to solve it?.
Cheers.

from metismenu.

harrywang avatar harrywang commented on May 25, 2024

Any solution to this? Thanks!!

from metismenu.

elvis7 avatar elvis7 commented on May 25, 2024

Replace your dummy href="#" with href="#any-word", worked for me. :)

from metismenu.

MoxFulder avatar MoxFulder commented on May 25, 2024

I think I have this problem too. My menu have some menus without submenus and some menus with submenus. When a menu with submenu is open, and I click on a menu without submenu, the previous menu with submenu open doesn't collapse.
I want to use metis release without modifying myself the lib. any idea ?

from metismenu.

gsag avatar gsag commented on May 25, 2024

Please fix it!

from metismenu.

onokumus avatar onokumus commented on May 25, 2024

@dzaeny @serloal @pballester @Zephyrante @jirapatj @laszlof @lenamtl @slimsoft @jujoramos @harrywang @elvis7 @MoxFulder @PTC-JoshuaMatthews @gsag

Please try https://github.com/onokumus/metismenu/tree/parent-toogle

from metismenu.

MoxFulder avatar MoxFulder commented on May 25, 2024

I still have the same issue using the parent-toggle branch.

from metismenu.

notridan avatar notridan commented on May 25, 2024

I have the same bug..

from metismenu.

setefocos avatar setefocos commented on May 25, 2024

Wow... what an old bug! I'm having this trouble now and just discovered this is here over 3 years!
@onokumus this menu is beautiful, and I really want to fix it to stay with it! Can you please do the fix suggested or help us with the better way to do it? Thank you for the component anyway!
Is parent-toggle a branch just to solve this problem? Will it be merged to master?

from metismenu.

pereiradiogo avatar pereiradiogo commented on May 25, 2024

News?

from metismenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.