octicon-rss(16/)
You've already forked ionic-framework
mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 22:44:13 +08:00
fix(many): disabled control in item does not receive active/hover states (#26867)
Resolves #26706
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
committed by
GitHub
gitea-unlock(16/)
parent
ef33270b55
commit
f829672a6a
octicon-diff(16/tw-mr-1) 6 changed files with 73 additions and 31 deletions
@@ -164,16 +164,23 @@ export class Radio implements ComponentInterface {
|
||||
}
|
||||
}
|
||||
|
||||
@Watch('color')
|
||||
@Watch('checked')
|
||||
@Watch('color')
|
||||
@Watch('disabled')
|
||||
emitStyle() {
|
||||
protected styleChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
private emitStyle() {
|
||||
const style: StyleEventDetail = {
|
||||
'interactive-disabled': this.disabled,
|
||||
};
|
||||
|
||||
if (this.legacyFormController.hasLegacyControl()) {
|
||||
this.ionStyle.emit({
|
||||
'radio-checked': this.checked,
|
||||
'interactive-disabled': this.disabled,
|
||||
});
|
||||
style['radio-checked'] = this.checked;
|
||||
}
|
||||
|
||||
this.ionStyle.emit(style);
|
||||
}
|
||||
|
||||
private updateState = () => {
|
||||
|
||||
@@ -154,6 +154,17 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>States</h1>
|
||||
<div class="grid">
|
||||
<ion-list>
|
||||
<ion-radio-group>
|
||||
<ion-item>
|
||||
<ion-radio disabled="true">Enable Notifications</ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-app>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user