Skip to content

Commit

Permalink
fix(component): don't emit a event on clear.
Browse files Browse the repository at this point in the history
On the remote-autocomplete component, no event must be sent
when the field is deleted.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Feb 17, 2025
1 parent b575b74 commit 4abf70b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* RERO angular core
* Copyright (C) 2024 RERO
* Copyright (C) 2024-2025 RERO
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand All @@ -24,7 +24,7 @@ import { FormlyFieldProps } from '@ngx-formly/primeng/form-field';
import { AutoCompleteCompleteEvent, AutoCompleteModule, AutoCompleteSelectEvent } from 'primeng/autocomplete';
import { ButtonModule } from 'primeng/button';
import { DropdownChangeEvent, DropdownModule } from 'primeng/dropdown';
import { Subject, switchMap } from 'rxjs';
import { Subject, switchMap, tap } from 'rxjs';
import { IQuery, IQueryOptions, IRemoteAutoCompleteFilter, IValueSelect } from './remote-autocomplete.interface';
import { RemoteAutocompleteService } from './remote-autocomplete.service';

Expand Down Expand Up @@ -169,7 +169,6 @@ export class RemoteAutocomplete extends FieldType<FormlyFieldConfig<IRemoteAutoC
clear(): void {
this.value = '';
this.formControl.reset(null);
this.onValueSelect.next(null);
this.field.focus = true;
}
}
Expand Down

0 comments on commit 4abf70b

Please sign in to comment.