|
|
|
@ -101,9 +101,6 @@ export class ExtensibleFormPropComponent implements OnChanges, AfterViewInit { |
|
|
|
@Input() isFirstGroup?: boolean; |
|
|
|
@ViewChild('field') private fieldRef!: ElementRef<HTMLElement>; |
|
|
|
|
|
|
|
private shouldFocus = signal(false); |
|
|
|
private isViewReady = signal(false); |
|
|
|
|
|
|
|
injectorForCustomComponent?: Injector; |
|
|
|
asterisk = ''; |
|
|
|
containerClassName = 'mb-2'; |
|
|
|
@ -120,15 +117,6 @@ export class ExtensibleFormPropComponent implements OnChanges, AfterViewInit { |
|
|
|
return this.disabledFn(this.data); |
|
|
|
} |
|
|
|
|
|
|
|
constructor() { |
|
|
|
// Effect to handle focus when both conditions are met
|
|
|
|
effect(() => { |
|
|
|
if (this.shouldFocus() && this.isViewReady() && this.fieldRef?.nativeElement) { |
|
|
|
this.focusElement(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
setTypeaheadValue(selectedOption: ABP.Option<string>) { |
|
|
|
this.typeaheadModel = selectedOption || { key: null, value: null }; |
|
|
|
const { key, value } = this.typeaheadModel; |
|
|
|
|