This commit is contained in:
STW_TTTY\stwtt 2024-09-30 16:50:07 +07:00
parent b0390d2e72
commit 8662e7eabb
2 changed files with 6 additions and 4 deletions

View file

@ -120,7 +120,7 @@ const columns = ref<QTableProps["columns"]>([
async function fecthListTransfer() {
showLoader();
await http
.get(config.API.listUserTransfer())
.get(config.API.listUserTransfer() + `?keyword=${filter.value}`)
.then((res) => {
let data = res.data.result;
rows.value = data.map((e: TransferList) => ({
@ -208,6 +208,7 @@ onMounted(async () => {
debounce="300"
placeholder="ค้นหา"
style="max-width: 200px"
@keydown.enter.prevent="fecthListTransfer()"
>
<template v-slot:append>
<q-icon v-if="filter == ''" name="search" />
@ -215,7 +216,7 @@ onMounted(async () => {
v-if="filter !== ''"
name="clear"
class="cursor-pointer"
@click="filter = ''"
@click="(filter = ''), fecthListTransfer()"
/>
</template>
</q-input>

View file

@ -60,7 +60,7 @@ const columns = ref<QTableProps["columns"]>([
async function fecthList() {
showLoader();
await http
.get(config.API.portfolio)
.get(config.API.portfolio+`?keyword=${filter.value}`)
.then((res) => {
rows.value = res.data.result;
})
@ -157,6 +157,7 @@ onMounted(async () => {
debounce="300"
placeholder="ค้นหา"
style="max-width: 200px"
@keydown.enter.prevent="fecthList()"
>
<template v-slot:append>
<q-icon v-if="filter == ''" name="search" />
@ -164,7 +165,7 @@ onMounted(async () => {
v-if="filter !== ''"
name="clear"
class="cursor-pointer"
@click="filter = ''"
@click="filter = '',fecthList()"
/>
</template>
</q-input>