feat: add support for case-insensitive search in the dashboard list (#418)

This commit is contained in:
Zixin Zhou 2024-10-07 23:14:22 +08:00 committed by GitHub
parent d65c18bd38
commit a92365efcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -612,7 +612,7 @@ limitations under the License. -->
}
function searchDashboards(pageIndex: number) {
const list = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
const arr = list.filter((d: { name: string }) => d.name.includes(searchText.value));
const arr = list.filter((d: { name: string }) => d.name.toLowerCase().includes(searchText.value.toLowerCase()));
total.value = arr.length;
dashboards.value = arr.filter(