1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 19:23:19 +00:00

[PM-30547] Table empty state message (#18752)

This commit is contained in:
Vijay Oommen
2026-02-04 10:42:13 -06:00
committed by GitHub
parent 9fc52cb46e
commit a2916084ee
3 changed files with 16 additions and 0 deletions

View File

@@ -38,6 +38,9 @@
"accessIntelligence": {
"message": "Access Intelligence"
},
"noApplicationsMatchTheseFilters": {
"message": "No applications match these filters"
},
"passwordRisk": {
"message": "Password Risk"
},

View File

@@ -43,5 +43,11 @@
[checkboxChange]="onCheckboxChange"
[showAppAtRiskMembers]="showAppAtRiskMembers"
></app-table-row-scrollable-m11>
@if (emptyTableExplanation()) {
<div class="tw-flex tw-mt-10 tw-justify-center">
<span bitTypography="body2">{{ emptyTableExplanation() }}</span>
</div>
}
</div>
}

View File

@@ -104,6 +104,7 @@ export class ApplicationsComponent implements OnInit {
icon: " ",
},
]);
protected readonly emptyTableExplanation = signal("");
constructor(
protected i18nService: I18nService,
@@ -164,6 +165,12 @@ export class ApplicationsComponent implements OnInit {
this.dataSource.filter = (app) =>
filterFunction(app) &&
app.applicationName.toLowerCase().includes(searchText.toLowerCase());
if (this.dataSource?.filteredData?.length === 0) {
this.emptyTableExplanation.set(this.i18nService.t("noApplicationsMatchTheseFilters"));
} else {
this.emptyTableExplanation.set("");
}
});
}