@arsedizioni/ars-utils 21.2.354 → 21.2.355

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.
@@ -1069,6 +1069,7 @@ class SelectDialogComponent {
1069
1069
  constructor() {
1070
1070
  this.paginator = viewChild.required('paginator');
1071
1071
  this.selection = viewChild.required("selection");
1072
+ this.isViewReady = false;
1072
1073
  this.dialogRef = inject((MatDialogRef));
1073
1074
  this.cdr = inject(ChangeDetectorRef);
1074
1075
  this.dialogData = signal((() => {
@@ -1123,6 +1124,9 @@ class SelectDialogComponent {
1123
1124
  this.doFilter(d.filter);
1124
1125
  }
1125
1126
  }
1127
+ ngAfterViewInit() {
1128
+ this.isViewReady = true;
1129
+ }
1126
1130
  /**
1127
1131
  * Updates the total item count signal, triggering UI refresh.
1128
1132
  * @param newTotal - The new total count; defaults to 0 if omitted.
@@ -1199,7 +1203,9 @@ class SelectDialogComponent {
1199
1203
  clearSelection() {
1200
1204
  this.selectionMasterIndeterminate.set(false);
1201
1205
  this.selectionMasterChecked.set(false);
1202
- this.selection().deselectAll();
1206
+ if (this.isViewReady) {
1207
+ this.selection().deselectAll();
1208
+ }
1203
1209
  this.selectionInfo.set(null);
1204
1210
  }
1205
1211
  /** Emits the current selection and closes the dialog. */