Cannot disable an ion-list button on Ionic 2
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
In my opinion: You cannot combine button with ion-item directive?!
You can: http://ionicframework.com/docs/v2/api/components/item/Item/
"Use
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>
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!
Thanks so much!