indexeddb search filter

This commit is contained in:
Martti Malmi 2023-08-25 14:10:58 +03:00
parent 26050c20b8
commit 008e566462

View File

@ -180,6 +180,9 @@ const IndexedDB = {
if (filter.kinds) {
query = query.where('kind').anyOf(filter.kinds);
}
if (filter.search) {
query = query.filter((event: Event) => event.content?.includes(filter.search!));
}
if (filter.limit) {
query = query.limit(filter.limit);
}