Skip to content

Commit c1ba0fb

Browse files
asynclizcopybara-github
authored andcommitted
fix: formAssociated being stripped from closure
PiperOrigin-RevId: 534091935
1 parent 7ab37e4 commit c1ba0fb

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

checkbox/lib/checkbox.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export class Checkbox extends LitElement {
2727
}
2828

2929
/** @nocollapse */
30-
static formAssociated = true;
30+
static get formAssociated() {
31+
return true;
32+
}
3133

3234
/**
3335
* Whether or not the checkbox is selected.

radio/lib/radio.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export class Radio extends LitElement {
3333
ShadowRootInit = {...LitElement.shadowRootOptions, delegatesFocus: true};
3434

3535
/** @nocollapse */
36-
static formAssociated = true;
36+
static get formAssociated() {
37+
return true;
38+
}
3739

3840
/**
3941
* Whether or not the radio is selected.

slider/lib/slider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ export class Slider extends LitElement {
6161
static override shadowRootOptions:
6262
ShadowRootInit = {...LitElement.shadowRootOptions, delegatesFocus: true};
6363

64-
/**
65-
* @nocollapse
66-
*/
67-
static formAssociated = true;
64+
/** @nocollapse */
65+
static get formAssociated() {
66+
return true;
67+
}
6868

6969
/**
7070
* Whether or not the slider is disabled.

switch/lib/switch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ export class Switch extends LitElement {
3131
static override shadowRootOptions:
3232
ShadowRootInit = {mode: 'open', delegatesFocus: true};
3333

34-
/**
35-
* @nocollapse
36-
*/
37-
static formAssociated = true;
34+
/** @nocollapse */
35+
static get formAssociated() {
36+
return true;
37+
}
3838

3939
/**
4040
* Disables the switch and makes it non-interactive.

0 commit comments

Comments
 (0)