Skip to content

Commit

Permalink
Fix form breakage with angular 19
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMDoerner committed Jan 18, 2025
1 parent 06328dc commit 95c5e69
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { FieldType, FieldTypeConfig, FormlyModule } from '@ngx-formly/core';
import {
combineLatest,
debounceTime,
distinctUntilChanged,
filter,
fromEvent,
map,
Expand Down Expand Up @@ -43,17 +44,17 @@ type AutocompleteSelectEvent<T> = {
};

@Component({
selector: 'app-formly-autocomplete-field',
imports: [
AsyncPipe,
ReactiveFormsModule,
FormlyModule,
SpinnerComponent,
BadgeComponent,
],
templateUrl: './formly-autocomplete-field.component.html',
styleUrl: './formly-autocomplete-field.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush
selector: 'app-formly-autocomplete-field',
imports: [
AsyncPipe,
ReactiveFormsModule,
FormlyModule,
SpinnerComponent,
BadgeComponent,
],
templateUrl: './formly-autocomplete-field.component.html',
styleUrl: './formly-autocomplete-field.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FormlyAutocompleteFieldComponent<T>
extends FieldType<FieldTypeConfig>
Expand Down Expand Up @@ -177,6 +178,7 @@ export class FormlyAutocompleteFieldComponent<T>
this.formControl.valueChanges
.pipe(
startWith(this.formControl.value),
distinctUntilChanged(),
withLatestFrom(this.selectedOption$, this.options$),
takeUntil(this.destroy$),
)
Expand Down

0 comments on commit 95c5e69

Please sign in to comment.