mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
assign certain props as properties
This commit is contained in:
@@ -61,7 +61,6 @@ export default class SlCheckbox extends LitElement {
|
||||
@event('sl-focus') slFocus: EventEmitter<void>;
|
||||
|
||||
firstUpdated() {
|
||||
this.input.indeterminate = this.indeterminate;
|
||||
this.invalid = !this.input.checkValidity();
|
||||
}
|
||||
|
||||
@@ -115,8 +114,6 @@ export default class SlCheckbox extends LitElement {
|
||||
@watch('checked', { waitUntilFirstUpdate: true })
|
||||
@watch('indeterminate', { waitUntilFirstUpdate: true })
|
||||
handleStateChange() {
|
||||
this.input.checked = this.checked;
|
||||
this.input.indeterminate = this.indeterminate;
|
||||
this.invalid = !this.input.checkValidity();
|
||||
this.slChange.emit();
|
||||
}
|
||||
@@ -173,9 +170,10 @@ export default class SlCheckbox extends LitElement {
|
||||
type="checkbox"
|
||||
name=${ifDefined(this.name)}
|
||||
value=${ifDefined(this.value)}
|
||||
?checked=${this.checked}
|
||||
?disabled=${this.disabled}
|
||||
?required=${this.required}
|
||||
.indeterminate=${this.indeterminate}
|
||||
.checked=${this.checked}
|
||||
.disabled=${this.disabled}
|
||||
.required=${this.required}
|
||||
role="checkbox"
|
||||
aria-checked=${this.checked ? 'true' : 'false'}
|
||||
aria-labelledby=${this.labelId}
|
||||
|
||||
@@ -172,8 +172,8 @@ export default class SlRadio extends LitElement {
|
||||
type="radio"
|
||||
name=${ifDefined(this.name)}
|
||||
value=${ifDefined(this.value)}
|
||||
?checked=${this.checked}
|
||||
?disabled=${this.disabled}
|
||||
.checked=${this.checked}
|
||||
.disabled=${this.disabled}
|
||||
aria-checked=${this.checked ? 'true' : 'false'}
|
||||
aria-disabled=${this.disabled ? 'true' : 'false'}
|
||||
aria-labelledby=${this.labelId}
|
||||
|
||||
@@ -152,9 +152,9 @@ export default class SlSwitch extends LitElement {
|
||||
type="checkbox"
|
||||
name=${ifDefined(this.name)}
|
||||
value=${ifDefined(this.value)}
|
||||
?checked=${this.checked}
|
||||
?disabled=${this.disabled}
|
||||
?required=${this.required}
|
||||
.checked=${this.checked}
|
||||
.disabled=${this.disabled}
|
||||
.required=${this.required}
|
||||
role="switch"
|
||||
aria-checked=${this.checked ? 'true' : 'false'}
|
||||
aria-labelledby=${this.labelId}
|
||||
|
||||
Reference in New Issue
Block a user