mirror of
https://github.com/garraflavatra/rolens.git
synced 2024-12-01 13:20:54 +00:00
Use find instead of filter
This commit is contained in:
parent
a4698eee43
commit
e83dd97e9c
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
function openJson(indexId) {
|
||||
const item = indexes?.filter(i => i.name == indexId);
|
||||
const item = indexes?.find(i => i.name == indexId);
|
||||
objectViewerData = item;
|
||||
}
|
||||
</script>
|
||||
@ -46,7 +46,7 @@
|
||||
<ObjectGrid key="name" data={indexes.map(idx => ({
|
||||
...idx,
|
||||
menu: [ { label: 'Drop this index', fn: () => drop(idx.name) } ],
|
||||
}))} bind:activeKey on:trigger={e => openJson(e.detail)} />
|
||||
}))} bind:activeKey on:trigger={e => openJson(e.detail.itemKey)} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user