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

Disabled items can't be selected #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

reinert
Copy link
Contributor

@reinert reinert commented Feb 10, 2016

This is an initial proposed solution for #99.

Basically it prevents select method to set a disabled item as selected. Also selectNext and selectPrevious are covered: they try to find the nearest enabled item. These three methods now return true if an item was selected or false otherwise.

Not covered situations yet:

  • When selected property is manually changed
  • When a selected item becomes disabled

@reinert
Copy link
Contributor Author

reinert commented Feb 10, 2016

Also, should there be a feature toggle like skipDisabledItems allowing the user to decided whether disable items should be selectable or not?

@bicknellr
Copy link
Contributor

Hey, just wanted to let you know this PR hasn't gone unnoticed and we'll get to it soon. Ping me here if 'soon' stops being accurate.

@reinert
Copy link
Contributor Author

reinert commented Feb 17, 2016

Ok. I will.

@reinert
Copy link
Contributor Author

reinert commented Feb 18, 2016

Idea: provide an attr-for-disabled option so the user can determine what attribute will be queried to check the disabled state. Default value, obviously, would be 'disabled'.

@bicknellr
Copy link
Contributor

btw, I was poking around in paper-radio-group and found that it also implements this: https://github.com/PolymerElements/paper-radio-group/blob/3ee7a79/paper-radio-group.html#L164

@reinert
Copy link
Contributor Author

reinert commented Feb 20, 2016

Good!

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

Successfully merging this pull request may close these issues.

None yet

3 participants