@dreamworld/dw-checkbox 3.0.3-event-name-change.1 → 3.1.0
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 +1 -1
- package/package.json +1 -1
- package/readme.md +5 -2
package/dw-checkbox.js
CHANGED
|
@@ -136,7 +136,7 @@ export class DwCheckbox extends DwFormElement(LitElement) {
|
|
|
136
136
|
_onChange(e) {
|
|
137
137
|
this.checked = e.target.checked;
|
|
138
138
|
this.dispatchEvent(new Event('checked-changed', e));
|
|
139
|
-
this.dispatchEvent(new
|
|
139
|
+
this.dispatchEvent(new CustomEvent('change'));
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -35,7 +35,8 @@ It supports below properties:
|
|
|
35
35
|
|
|
36
36
|
## Events
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
- `checked-changed`: Dispatched when user updates checked status. It's DEPRECATED now, instead use `change`.
|
|
39
|
+
- `change`: Dispatched when user updates checked status. So, same as [browser default event][browser-event-change]
|
|
39
40
|
|
|
40
41
|
## Features
|
|
41
42
|
|
|
@@ -64,4 +65,6 @@ In below example, dwForm.serialize() method's result is `{fruit: ['apple', 'kiwi
|
|
|
64
65
|
<dw-checkbox name="fruit" value="grapes" label="Grapes"></dw-checkbox>
|
|
65
66
|
<dw-checkbox name="fruit" value="kiwi" label="Kiwi" checked></dw-checkbox>
|
|
66
67
|
</dw-form>
|
|
67
|
-
```
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
[browser-event-change]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|