Giter Site home page Giter Site logo

polymer-selector's Introduction

polymer-selector's People

Contributors

frankiefu avatar sorvell avatar dfreedm avatar

Stargazers

Ray Nicholus avatar AJ Klein avatar Günter Zöchbauer avatar

Watchers

Michael Bleigh avatar Alex Komoroske avatar Gray Norton avatar Ian MacLeod avatar  avatar Alice avatar Addy Osmani avatar  avatar Eric Bidelman avatar  avatar yuin avatar Josh Gargus avatar Domenic Denicola avatar James Cloos avatar Jenny Messerly avatar  avatar Kevin Schaaf avatar Emmanuel Garcia avatar Meggin Kearney avatar  avatar Wendy Ginsberg avatar  avatar Gavin Doughtie avatar Yufeng avatar Tim van der Lippe avatar Natan Sągol avatar  avatar  avatar  avatar

polymer-selector's Issues

Can polymer-selector do an initial check for `active`

In some situations it's easier to set a menu item as active instead of setting a selected index. For example, here's some markup from the Polymer site:

<dropdown-panel>
  <polymer-ui-menu-item
    src="/images/picons/ic_guide_dark_.png"
    label="Start"
    href="/docs/start/getting-the-code.html"
    {% if page.navgroup == 'start' %}active{% endif %}>
  </polymer-ui-menu-item>

  <polymer-ui-menu-item
    src="/images/picons/ic_book_dark_.png"
    label="Docs"
    href="/docs/polymer/polymer.html"
    {% if page.navgroup == 'docs' %}active{% endif %}>
  </polymer-ui-menu-item>

  <polymer-ui-menu-item
    src="/images/picons/ic_feedback_dark_.png"
    label="Resources"
    href="/resources/faq.html"
    {% if page.navgroup == 'resources' %}active{% endif %}>
  </polymer-ui-menu-item>

  <polymer-ui-menu-item
    src="/images/picons/ic_people_dark.png"
    label="Community"
    href="/discuss.html"
    {% if page.navgroup == 'community' %}active{% endif %}>
  </polymer-ui-menu-item>
</dropdown-panel>

Is it possible for polymer-selector to do an initial check of its children to determine which item is selected? Without this check, if I assign another item as selected it will not remove the original active attribute and I end up with two active items.

Can polymer-selector observe for selectedModel changed

Currently, polymer-selector only observes changes to selectedItem. Could it also observe changes to selectedModel? I would like to dynamically change selection by specifying a data object in my array, without caring what HTML element does it bind to.

I think Polymer website would also benefit from that because currently it does quite a lot of work to expand an item in the menu: https://github.com/Polymer/docs/blob/39329d74c0511e5fd8d7bfe3d380cc70b0f116f1/elements/docs-menu.html#L73 (see method highlightItemWithURL)

Allow items to be filtered via itemsSelector when target is self

polymer-ui-menu extends polymer-selector and the selector target is the menu itself. It would be useful to be able to locate the menu items as other than direct children of the menu. The itemsSelector property is intended for this use but it only works if the selector targets another element.

This would be useful for this type of construction:

<polymer-ui-menu>
  <a><polymer-ui-menu-item></polymer-ui-menu-item></a>
 ...

See this thread for more info: https://groups.google.com/forum/#!topic/polymer-dev/CTumvA_cTtE

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.