mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 21:17:59 +00:00
Don't pass a JS event to Go :)
This commit is contained in:
parent
8d9c163d3b
commit
3312b4ae35
@ -16,9 +16,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function drop(key = activeKey) {
|
async function drop(key) {
|
||||||
if (!key) {
|
if (typeof key !== 'string') {
|
||||||
return;
|
key = activeKey;
|
||||||
}
|
}
|
||||||
const success = await DropIndex(collection.hostKey, collection.dbKey, collection.key, key);
|
const success = await DropIndex(collection.hostKey, collection.dbKey, collection.key, key);
|
||||||
if (success) {
|
if (success) {
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
<ObjectGrid key="name" data={indexes.map(idx => ({
|
<ObjectGrid key="name" data={indexes.map(idx => ({
|
||||||
...idx,
|
...idx,
|
||||||
menu: [ { label: 'Drop this index…', fn: () => drop(idx.name) } ],
|
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)} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user