Browse Source

refactor: remove tagsChanged output from tags selector component

pull/5666/head
jassu2244 1 month ago
parent
commit
0a999c9da9
  1. 6
      libs/ui/src/lib/tags-selector/tags-selector.component.ts

6
libs/ui/src/lib/tags-selector/tags-selector.component.ts

@ -5,12 +5,10 @@ import {
Component, Component,
CUSTOM_ELEMENTS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA,
ElementRef, ElementRef,
EventEmitter,
Input, Input,
OnChanges, OnChanges,
OnDestroy, OnDestroy,
OnInit, OnInit,
Output,
signal, signal,
ViewChild ViewChild
} from '@angular/core'; } from '@angular/core';
@ -65,8 +63,6 @@ export class GfTagsSelectorComponent
@Input() readonly = false; @Input() readonly = false;
@Input() tagsAvailable: Tag[]; @Input() tagsAvailable: Tag[];
@Output() tagsChanged = new EventEmitter<Tag[]>();
@ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>; @ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>;
public filteredOptions: Subject<Tag[]> = new BehaviorSubject([]); public filteredOptions: Subject<Tag[]> = new BehaviorSubject([]);
@ -112,7 +108,6 @@ export class GfTagsSelectorComponent
}); });
const newTags = this.tagsSelected(); const newTags = this.tagsSelected();
this.tagsChanged.emit(newTags);
this.onChange(newTags); this.onChange(newTags);
this.onTouched(); this.onTouched();
this.tagInput.nativeElement.value = ''; this.tagInput.nativeElement.value = '';
@ -127,7 +122,6 @@ export class GfTagsSelectorComponent
}); });
const newTags = this.tagsSelected(); const newTags = this.tagsSelected();
this.tagsChanged.emit(newTags);
this.onChange(newTags); this.onChange(newTags);
this.onTouched(); this.onTouched();
this.updateFilters(); this.updateFilters();

Loading…
Cancel
Save