mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 13:07:58 +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) {
|
||||
if (!key) {
|
||||
return;
|
||||
async function drop(key) {
|
||||
if (typeof key !== 'string') {
|
||||
key = activeKey;
|
||||
}
|
||||
const success = await DropIndex(collection.hostKey, collection.dbKey, collection.key, key);
|
||||
if (success) {
|
||||
@ -45,7 +45,7 @@
|
||||
<div class="grid">
|
||||
<ObjectGrid key="name" data={indexes.map(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)} />
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user