remove scan

This commit is contained in:
2023-09-23 11:50:28 +02:00
parent 2c728c7037
commit 575d4dc5ab
2 changed files with 7 additions and 2 deletions

View File

@@ -41,6 +41,9 @@ const addItem = async () => {
}
addOrRelaod(type);
}
const removeItem = (type: MarketType) => {
items.value = items.value.filter(i => i.type.id !== type.id);
}
watch(items, async itms => markeyScanStore.setTypes(itms.map(i => i.type.id)));
@@ -72,7 +75,7 @@ watch(() => markeyScanStore.types, async t => {
</div>
<template v-if="items.length > 0">
<hr />
<ScanResultTable :items="items" @buy="(type, buy, sell) => buyModal?.open(type, { 'Buy': buy, 'Sell': sell })" />
<ScanResultTable :items="items" @buy="(type, buy, sell) => buyModal?.open(type, { 'Buy': buy, 'Sell': sell })" @remove="removeItem" />
<BuyModal ref="buyModal" />
</template>
</template>