Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
set checked(value: boolean) {
const newCheckedState = coerceBooleanProperty(value);
if (this._checked !== newCheckedState) {
this._checked = newCheckedState;
if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {
this.radioGroup.selected = this;
} else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {
// When unchecking the selected radio button, update the selected radio
// property on the group.
this.radioGroup.selected = null;
}
if (newCheckedState) {
// Notify all radio buttons with the same name to un-check.
this._radioDispatcher.notify(this.id, this.name);
}
this._changeDetector.markForCheck();
async isChecked(): Promise {
const checked = (await this._input()).getProperty('checked');
return coerceBooleanProperty(await checked);
}
function (expand) {
this._setExpand(coerceBooleanProperty(expand));
},
enumerable: true,
set disableRipple(value: boolean) {
this._disableRipple = coerceBooleanProperty(value);
}
private _disableRipple: boolean = false;
setShort(short: boolean, isUserInput: boolean = false): void {
this._short = coerceBooleanProperty(short);
if (this.short) {
this.setProminent(false);
this.setDense(false);
this.setFixed(false);
} else {
this.setShortCollapsed(false);
}
if (isUserInput) {
this._initFoundation();
}
}
set interactiveClose(val: boolean) {
this._interactiveClose = coerceBooleanProperty(val);
}
private _interactiveClose = true;
set required(value: boolean) {
this._required = coerceBooleanProperty(value);
this.stateChanges.next();
}
public set disabled(value: boolean | string) {
const disabled = coerceBooleanProperty(value);
this._disabled = disabled || null;
if (this.disabled) {
this.edit$.next([false, false]);
}
}
set disabled(value: boolean) {
this._disabled = coerceBooleanProperty(value);
}
set disabled(value: boolean) {
this._disabled = coerceBooleanProperty(value);
}