mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
[SM-497] Add filtering capabilities to the table datasource (#4717)
* Add filtering capabilities to the table datasource
This commit is contained in:
@@ -24,6 +24,11 @@ export class ProjectsListComponent implements OnDestroy {
|
||||
}
|
||||
private _projects: ProjectListView[];
|
||||
|
||||
@Input()
|
||||
set search(search: string) {
|
||||
this.dataSource.filter = search;
|
||||
}
|
||||
|
||||
@Output() editProjectEvent = new EventEmitter<string>();
|
||||
@Output() deleteProjectEvent = new EventEmitter<ProjectListView[]>();
|
||||
@Output() onProjectCheckedEvent = new EventEmitter<string[]>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<sm-header>
|
||||
<input bitInput [placeholder]="'searchProjects' | i18n" />
|
||||
<input bitInput [placeholder]="'searchProjects' | i18n" [(ngModel)]="search" />
|
||||
<sm-new-menu></sm-new-menu>
|
||||
</sm-header>
|
||||
<sm-projects-list
|
||||
@@ -7,5 +7,6 @@
|
||||
(editProjectEvent)="openEditProject($event)"
|
||||
(deleteProjectEvent)="openDeleteProjectDialog($event)"
|
||||
[projects]="projects$ | async"
|
||||
[search]="search"
|
||||
>
|
||||
</sm-projects-list>
|
||||
|
||||
@@ -21,7 +21,8 @@ import { ProjectService } from "../project.service";
|
||||
templateUrl: "./projects.component.html",
|
||||
})
|
||||
export class ProjectsComponent implements OnInit {
|
||||
projects$: Observable<ProjectListView[]>;
|
||||
protected projects$: Observable<ProjectListView[]>;
|
||||
protected search: string;
|
||||
|
||||
private organizationId: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user