@dreamworld/dw-checkbox 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dw-checkbox.js +10 -0
- package/package.json +1 -1
package/dw-checkbox.js
CHANGED
|
@@ -129,6 +129,16 @@ export class DwCheckbox extends DwFormElement(LitElement) {
|
|
|
129
129
|
this.shadowRoot.querySelector('dw-form-field').input.click();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Sets focus on the checkbox.
|
|
134
|
+
*/
|
|
135
|
+
focus() {
|
|
136
|
+
const checkbox = this.shadowRoot.querySelector("base-checkbox");
|
|
137
|
+
if (checkbox) {
|
|
138
|
+
checkbox.focus();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
132
142
|
/**
|
|
133
143
|
* Trigger's `checked-changed` event
|
|
134
144
|
* Sets value of `checked` property
|