[ui] add default search limit at 50
parent
34847f3321
commit
859838f124
|
@ -11,12 +11,15 @@ export function baseSearchOnce(query: string) {
|
|||
}
|
||||
|
||||
export async function getObjects(
|
||||
entries: UpEntry[]
|
||||
entries: UpEntry[],
|
||||
limit = 50
|
||||
): Promise<[string, string][]> {
|
||||
const labelled = entries
|
||||
.slice(0, limit)
|
||||
.filter((e) => e.attribute == "LBL")
|
||||
.map((e) => [e.entity, String(e.value.c)] as [string, string]);
|
||||
const aliased = entries
|
||||
.slice(0, limit)
|
||||
.filter((e) => e.attribute === "ALIAS")
|
||||
.map(async (aliasEntry) => {
|
||||
const entry = await fetchEntry(aliasEntry.entity);
|
||||
|
|
Loading…
Reference in New Issue