various changes

This commit is contained in:
X4Lo committed 2024-04-03 21:45:19 +00:00
1 parent cd4514fd2d
commit 2f27c4cfdf
8 files changed
+21 -130

No files matched your search

@@ -11,6 +11,7 @@ import { ListService } from '../../../core/services/list.service';
export class ListsComponent implements OnInit {
searchControl = new FormControl('');
showAddButton: boolean = false;
listsCount: number = 0;
lists: List[] = [];
listsToShow: List[] = [];
@@ -27,8 +28,8 @@ export class ListsComponent implements OnInit {
getLists() {
this.listService.getLists().subscribe({
next: (l) => {
console.log(`Loaded ${l.length} lists.`);
this.lists = l;
console.log(this.lists);
this.listsToShow = this.lists;
this.applyFilter();
},
@@ -50,6 +51,7 @@ export class ListsComponent implements OnInit {
this.listsToShow = this.lists.filter((collection) =>
collection.name.toLowerCase().trim().includes(normalizedFilter)
);
this.listsCount = this.listsToShow.length;
}
createList() {