Feature(search): add error message if search failed

This commit is contained in:
Pieter Vander Vennet 2025-07-24 14:41:43 +02:00
parent 20984d1a46
commit 0cbfa325f6
11 changed files with 138 additions and 50 deletions

View file

@ -45,15 +45,16 @@ export class Stores {
?.then((d) => src.setData(d))
return src
}
public static concat<T>(stores: Store<T[] | undefined>[]): Store<(T[] | undefined)[]> {
const newStore = new UIEventSource<(T[] | undefined)[]>([])
public static concat<T>(stores: Store<T | undefined>[]): Store<(T | undefined)[]> ;
public static concat<T>(stores: Store<T>[]): Store<T[]> ;
public static concat<T>(stores: Store<T | undefined>[]): Store<(T | undefined)[]> {
const newStore = new UIEventSource<(T | undefined)[]>([])
function update() {
if (newStore._callbacks.isDestroyed) {
return true // unregister
}
const results: (T[] | undefined)[] = []
const results: (T | undefined)[] = []
for (const store of stores) {
results.push(store.data)
}