@smartbit4all/ng-client 3.3.130 → 3.3.131

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.
@@ -12932,27 +12932,25 @@ class SmartComponentLayoutComponent {
12932
12932
  .subscribe((list) => {
12933
12933
  this.setToolbarComponent(list.first);
12934
12934
  });
12935
- if (this.smartComponentLayout) {
12936
- this.setUp();
12937
- }
12935
+ this.setUp();
12938
12936
  }
12939
12937
  ngOnDestroy() {
12940
12938
  this._destroy$.next();
12941
12939
  this._destroy$.complete();
12942
12940
  }
12943
12941
  ngOnChanges(changes) {
12942
+ this.setUp();
12943
+ }
12944
+ setUp() {
12945
+ if (!this.parentSmartComponent || !this.smartComponentLayout) {
12946
+ return;
12947
+ }
12944
12948
  if (deepEqual(this.smartComponentLayout, this.currentLayout)) {
12945
12949
  // no layout change, keep current state
12950
+ return;
12946
12951
  }
12947
- else {
12948
- // layout changed, render
12949
- this.currentLayout = JSON.parse(JSON.stringify(this.smartComponentLayout));
12950
- if (this.smartComponentLayout) {
12951
- this.setUp();
12952
- }
12953
- }
12954
- }
12955
- setUp() {
12952
+ // layout changed, render, but save current
12953
+ this.currentLayout = JSON.parse(JSON.stringify(this.smartComponentLayout));
12956
12954
  this.uuid = this.parentSmartComponent.uuid;
12957
12955
  this.treeService = this.parentSmartComponent.smartTreeService;
12958
12956
  this.smartComponentLayout?.direction;