diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 91f4318d51..fbbee0ad36 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -38,6 +38,7 @@ - `[Radio]` Fixed an issue where the radio group could not set checked for radio elements when using Angular's FormControl and value binding. ([#2700](https://github.com/infor-design/enterprise-wc/issues/2700)) - `[Splitter]` Converted datagrid popups to fixed to go over splitter panes. ([#2499](https://github.com/infor-design/enterprise-wc/issues/2499)) - `[Splitter]` Fixed an issue where position was not retained when expanding and collapsing. ([#2527](https://github.com/infor-design/enterprise-wc/issues/2527)) +- `[Switch]` Fixed an issue where switch triggered `change` event twice. ([#2681](https://github.com/infor-design/enterprise-wc/issues/2681)) ## 1.4.2 diff --git a/src/components/ids-switch/ids-switch.ts b/src/components/ids-switch/ids-switch.ts index 60bdf32d81..64ecc7efb2 100644 --- a/src/components/ids-switch/ids-switch.ts +++ b/src/components/ids-switch/ids-switch.ts @@ -295,11 +295,7 @@ export default class IdsSwitch extends Base { * @param {string} value the value property */ set value(value: string) { - if (!value) { - this.removeAttribute(attributes.VALUE); - return; - } - this.setAttribute(attributes.VALUE, value || ''); + super.value = value; } /**