@cuby-ui/core 0.0.115 → 0.0.117

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.
@@ -726,6 +726,7 @@ const CUI_DIALOG_CONTEXT = new InjectionToken('');
726
726
 
727
727
  class CuiDialogsComponent {
728
728
  constructor() {
729
+ this.injector = inject(Injector);
729
730
  this.destroy$ = inject(CuiDestroyService, { self: true });
730
731
  this.dialogs$ = inject(CUI_DIALOGS);
731
732
  this.dialogInjectorCache = new Map();
@@ -743,7 +744,8 @@ class CuiDialogsComponent {
743
744
  this.dialogInjectors = dialogs.map(dialog => {
744
745
  if (!this.dialogInjectorCache.has(dialog.id)) {
745
746
  this.dialogInjectorCache.set(dialog.id, Injector.create({
746
- providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }]
747
+ providers: [{ provide: CUI_DIALOG_CONTEXT, useValue: dialog }],
748
+ parent: this.injector
747
749
  }));
748
750
  }
749
751
  return this.dialogInjectorCache.get(dialog.id);
@@ -1938,7 +1940,8 @@ class CuiSelectComponent {
1938
1940
  }
1939
1941
  writeValue(value) {
1940
1942
  this.value = value;
1941
- this.selectedOption = value;
1943
+ // TODO: Непонятно, зачем нужно в construction вторая часть выражения
1944
+ this.selectedOption = this.options.find(option => option.value === value) ?? value;
1942
1945
  this.changeDetectorRef.markForCheck();
1943
1946
  }
1944
1947
  registerOnChange(fn) {