-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Labels
package: core@ionic/core package@ionic/core packagetype: buga confirmed bug reporta confirmed bug report
Description
Bug Report
Ionic version:
[x] 4.1.2
Current behavior:
The disabled
attribute seems to be ineffective for ion-item-option
. I have tried a couple of different ways to set it (both the property binding, and attribute value), neither of which had any effect.
The button remains enabled, and it can still be clicked.
Expected behavior:
For the button to be disabled
and the visible effect of the button to indicate it is disabled.
Steps to reproduce:
- Create an Ionic v4 app (link to be provided below for reproduction).
- Create an
ion-list
with an item containing anion-item-option
with thedisabled
attribute set totrue
. - Run the app.
- Slide the item to the left.
- Observe the button is still enabled.
Related code:
GitHub: https://github.com/kelvindart/ion-item-option_disabled_bug
(Property binding):
</ion-list>
<ion-item-sliding>
<ion-item><ion-label>Goldeneye 007 (prop)</ion-label></ion-item>
<ion-item-options>
<ion-item-option (click)="doSomething()" [disabled]="true">More</ion-item-option>
</ion-item-options>
</ion-item-sliding>
</ion-list>
Or (attribute binding):
</ion-list>
<ion-item-sliding>
<ion-item><ion-label>Goldeneye 007 (attr)</ion-label></ion-item>
<ion-item-options>
<ion-item-option (click)="doSomething()" disabled="true">More</ion-item-option>
</ion-item-options>
</ion-item-sliding>
</ion-list>
Other information:
Looking at the Dev Tools, it appears like the attribute disabled
is applied to the underlying button in the shadow DOM for the component.
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/Users/kelvindart/.nvm/versions/node/v10.15.3/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.1.2
@angular-devkit/build-angular : 0.13.6
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.6
@ionic/angular-toolkit : 1.4.1
System:
NodeJS : v10.15.3 (/Users/kelvindart/.nvm/versions/node/v10.15.3/bin/node)
npm : 6.9.0
OS : macOS High Sierra
Metadata
Metadata
Assignees
Labels
package: core@ionic/core package@ionic/core packagetype: buga confirmed bug reporta confirmed bug report