mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
feat(select): add disabled status in select options
This commit is contained in:

committed by
Adam Bradley

parent
d993a1bfd8
commit
76619cf4d0
@ -14,6 +14,7 @@ import { isPresent, isTrueProperty } from '../../util/util';
|
||||
})
|
||||
export class Option {
|
||||
private _checked: any = false;
|
||||
private _disabled: any = false;
|
||||
private _value: any;
|
||||
|
||||
/**
|
||||
@ -50,6 +51,18 @@ export class Option {
|
||||
this._value = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* @input {boolean} Whether or not the option is disabled
|
||||
*/
|
||||
@Input()
|
||||
get disabled() {
|
||||
return this._disabled;
|
||||
}
|
||||
|
||||
set disabled(val) {
|
||||
this._disabled = isTrueProperty(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
Reference in New Issue
Block a user