Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Supported disabled items #16

Open
ebidel opened this issue Sep 24, 2014 · 3 comments
Open

Supported disabled items #16

ebidel opened this issue Sep 24, 2014 · 3 comments

Comments

@ebidel
Copy link
Contributor

ebidel commented Sep 24, 2014

Using core-menu, I found myself wanting to prevent certain children from being selectable.

<core-menu>
  <paper-item label="Inbox" icon="inbox"></paper-item>
  <paper-item label="Social" icon="account-child"></paper-item>
  <paper-item class="separator" disabled></paper-item >
  <paper-item label="Sent" icon="send"></paper-item>
</core-menu>

In this case , excludedLocalNames won't work. It would be nice to support the disabled attribute (or something similar) in core-selector. Or maybe a better place is for core-menu to handle it?

@frankiefu
Copy link
Contributor

There is an issue filed on core-menu here: googlearchive/core-menu#8

@ssorallen
Copy link
Contributor

A paper-item maybe shouldn't be used for a separator because it's not a member of the selectable items in the menu (regardless of being active or disabled).

A disable-able item would be nice though:

  • core-item needs to expose a disabled attribute.
  • core-item needs basic styling for :host([disabled]), maybe 40% opacity, no pointer events, cursor "not-allowed"
  • A disabled core-item should maybe prevent the default action on an anchor within it? (This feels magical.)
  • core-selector needs to prevent user- and programmatic selection of disabled items within it

@RobertLowe
Copy link

It would be nice if core-selector supported disabled, this would also allow paper-tab's to be disable-able for another example.

I'm sure there are a plethora of use cases for this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants