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

Cannot disable an ion-list button on Ionic 2 #6108

Closed
boaz-chen opened this issue Apr 10, 2016 · 5 comments
Closed

Cannot disable an ion-list button on Ionic 2 #6108

boaz-chen opened this issue Apr 10, 2016 · 5 comments
Assignees
Milestone

Comments

@boaz-chen
Copy link

I have the following view which doesn't work as expected (button isn't disabled):

<ion-list> <button ion-item disabled> My Button </button> </ion-list>

Ionic Version: 2.0.0-beta.3

@johnfakeacc
Copy link

In my opinion: You cannot combine button with ion-item directive?!

@danielcrk-cn
Copy link

You can:
http://ionicframework.com/docs/v2/api/components/item/Item/

"Use for something that can be clicked/tapped. Typically this element will also have a (click) handler."

@boaz-chen
Copy link
Author

As a workaround for now I've defined the following CSS:

.item-disabled, item-disabled * { opacity: 0.3; pointer-events: none; }

And then in my HTML:

<ion-list> <button ion-item class="item-disabled"> My Button </button> </ion-list>

@jgw96 jgw96 added the v2 label Apr 11, 2016
@brandyscarney brandyscarney self-assigned this Apr 29, 2016
@brandyscarney brandyscarney added this to the 2.0.0-beta.8 milestone Apr 29, 2016
brandyscarney added a commit that referenced this issue May 20, 2016
add opacity and remove pointer events

closes #6108
@brandyscarney
Copy link
Member

brandyscarney commented May 20, 2016

This has been added to the beta.8 release. If you'd like to check it out sooner, I've released a nightly version that can be installed by running the following in a terminal:

npm install --save [email protected]

If you haven't updated to beta.7 yet, check out the changelog for steps to update.

Let me know if you find any issues. Thanks!

@boaz-chen
Copy link
Author

Thanks so much!

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
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

5 participants