@smartbit4all/ng-client 3.1.52 → 3.1.54

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.
@@ -11825,21 +11825,21 @@ class SmartComponentLayoutComponent {
11825
11825
  this._destroy$ = new Subject();
11826
11826
  }
11827
11827
  ngAfterViewInit() {
11828
+ if (this.smartFormList?.first) {
11829
+ this.setFormComponent(this.smartFormList?.first);
11830
+ }
11828
11831
  this.smartFormList.changes
11829
11832
  .pipe(takeUntil(this._destroy$))
11830
11833
  .subscribe((list) => {
11831
- if (!this.smartFormComponent) {
11832
- this.smartFormComponent = list.first;
11833
- this.bindForm();
11834
- }
11834
+ this.setFormComponent(list.first);
11835
11835
  });
11836
+ if (this.smartGridList?.first) {
11837
+ this.setGridComponent(this.smartGridList?.first);
11838
+ }
11836
11839
  this.smartGridList.changes
11837
11840
  .pipe(takeUntil(this._destroy$))
11838
11841
  .subscribe((list) => {
11839
- if (!this.smartGridComponent) {
11840
- this.smartGridComponent = list.first;
11841
- this.bindGrid();
11842
- }
11842
+ this.setGridComponent(list.first);
11843
11843
  });
11844
11844
  this.smartFilterList.changes
11845
11845
  .pipe(takeUntil(this._destroy$))
@@ -11909,6 +11909,12 @@ class SmartComponentLayoutComponent {
11909
11909
  };
11910
11910
  this.bindForm();
11911
11911
  }
11912
+ setFormComponent(comp) {
11913
+ if (!this.smartFormComponent) {
11914
+ this.smartFormComponent = comp;
11915
+ this.bindForm();
11916
+ }
11917
+ }
11912
11918
  bindForm() {
11913
11919
  if (this.smartForm && this.smartFormComponent) {
11914
11920
  this.parent?.addForm(
@@ -11940,6 +11946,12 @@ class SmartComponentLayoutComponent {
11940
11946
  };
11941
11947
  this.bindGrid();
11942
11948
  }
11949
+ setGridComponent(comp) {
11950
+ if (!this.smartGridComponent) {
11951
+ this.smartGridComponent = comp;
11952
+ this.bindGrid();
11953
+ }
11954
+ }
11943
11955
  bindGrid() {
11944
11956
  if (this.smartGrid && this.smartGridComponent) {
11945
11957
  this.smartGrid = this.parent?.addGrid(this.smartGrid, {