@open-rlb/ng-bootstrap 2.3.2 → 2.3.3

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.
@@ -10283,14 +10283,17 @@ class SwitchComponent extends AbstractComponent {
10283
10283
  }
10284
10284
  }
10285
10285
  onWrite(data) {
10286
+ this.data = data;
10287
+ }
10288
+ ngAfterViewInit() {
10286
10289
  if (this.el && this.el.nativeElement) {
10287
- if (data === undefined || data === null)
10290
+ if (this.data === undefined || this.data === null)
10288
10291
  return;
10289
- if (typeof data === 'string') {
10290
- this.el.nativeElement.checked = /^true$/i.test(data);
10292
+ if (typeof this.data === 'string') {
10293
+ this.el.nativeElement.checked = /^true$/i.test(this.data);
10291
10294
  }
10292
10295
  else {
10293
- this.el.nativeElement.checked = data;
10296
+ this.el.nativeElement.checked = this.data;
10294
10297
  }
10295
10298
  }
10296
10299
  }