Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to interact with navview component #1538

Closed
floppy69 opened this issue May 16, 2020 · 2 comments
Closed

Unable to interact with navview component #1538

floppy69 opened this issue May 16, 2020 · 2 comments

Comments

@floppy69
Copy link

Hi, i want to interact with the component Navview to toogle the pane but whenever i use Metro.GetPlugin i got an undefined response

 $(".content-inner").on("click", function(){
            var navview = Metro.getPlugin("#nav", "navview-pane");
            if (navview.isOpen()) {
                navview.close();
            }
        });

even with

Metro.getPlugin("#nav", "navview")

I use Metro 4.3.7 version

@olton
Copy link
Owner

olton commented May 16, 2020

methods open, close, toggle from navview API works when navview-pane is not visible according to media rules. I will add later (in 4.3.8 or 4.4.0) methods that will switch full and compacted modes.

@olton olton added the Complete label Jul 11, 2020
@olton olton added this to the 4.3.10 milestone Jul 11, 2020
olton added a commit that referenced this issue Jul 11, 2020
@olton
Copy link
Owner

olton commented Jul 11, 2020

Added method toggleMode(). This method toggles mode between expanded and compact.

var nv = Metro.getPlugin('el', 'navview');
nv.toggleMode();

@olton olton closed this as completed Jul 13, 2020
olton added a commit that referenced this issue Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants