GithubHelp home page GithubHelp logo

Comments (6)

miguelcobain avatar miguelcobain commented on May 16, 2024

Correct. I'm refectoring sidenav.
Hope it will land on master along with the flex grid.

from ember-paper.

miguelcobain avatar miguelcobain commented on May 16, 2024

Well, after the sidenav refactoring, this still is a problem.

Any ideas to fix this?
We can't just close the sidenav on any click, right?
What would be a good rationale for the sidenav closing? A manual call? Route change?

from ember-paper.

jerel avatar jerel commented on May 16, 2024

Personally I think animating out at the beginning of a route change would be a good default but in some situations (can't think of any) the drawer might need to stay open until closed manually. I don't see that the spec gives any direction on it unfortunately...

from ember-paper.

miguelcobain avatar miguelcobain commented on May 16, 2024

This why I love Ember.
So much beauty in this solution.

When you think that components/views just need to represent the state of a controller, everything is easier.

from ember-paper.

rsaccon avatar rsaccon commented on May 16, 2024

l have a use case where you don't want to close the drawer at all: when an item is not a link but contains sub items, and a click on it is to expand / collapse the sub items. But I think with this approach (or at worst with a slight modification - I have not tried), it is also possible to keep the drawer open if the route does not change

from ember-paper.

miguelcobain avatar miguelcobain commented on May 16, 2024

This approach basically delegates the drawer closing to the application. Just set open to false or true, whenever you need it.
In the demo app I used The willTransition hook. You don't need to do it in your use case.
I find this very flexible. Very elegant. Very Ember.

from ember-paper.

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.