@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.
Files changed (2) hide show
  1. package/dw-checkbox.js +10 -0
  2. 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamworld/dw-checkbox",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "",
5
5
  "main": "dw-checkbox.js",
6
6
  "type": "module",