inicializar search string en listado de categorias

This commit is contained in:
Eduardo Quiros 2021-07-10 20:20:13 -06:00
parent 4ceff2b1f4
commit 73fece59a2
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 5 additions and 1 deletions

View File

@ -13,8 +13,11 @@ import { CategoriaDeleteDialogComponent } from '../delete/categoria-delete-dialo
export class CategoriaComponent implements OnInit { export class CategoriaComponent implements OnInit {
categorias?: ICategoria[]; categorias?: ICategoria[];
isLoading = false; isLoading = false;
public searchString: string;
constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) {} constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) {
this.searchString = '';
}
loadAll(): void { loadAll(): void {
this.isLoading = true; this.isLoading = true;
@ -31,6 +34,7 @@ export class CategoriaComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.searchString = '';
this.loadAll(); this.loadAll();
} }