feat: refs #6999 added tab to search in VnTable filter
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
493e518339
commit
7f4a73fd56
|
@ -143,6 +143,10 @@ function alignRow() {
|
|||
const showFilter = computed(
|
||||
() => $props.column?.columnFilter !== false && $props.column.name != 'tableActions'
|
||||
);
|
||||
|
||||
const onTabPressed = async () => {
|
||||
if (model.value) enterEvent['keyup.enter']();
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div
|
||||
|
@ -157,6 +161,7 @@ const showFilter = computed(
|
|||
v-model="model"
|
||||
:components="components"
|
||||
component-prop="columnFilter"
|
||||
@keydown.tab="onTabPressed"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
|
@ -14,8 +13,6 @@ import VnImg from 'src/components/ui/VnImg.vue';
|
|||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const arrayData = useArrayData('LatestBuys', { searchUrl: 'Buys/latestBuysFilter' });
|
||||
const lastParams = {};
|
||||
const columns = [
|
||||
{
|
||||
align: 'center',
|
||||
|
@ -244,20 +241,6 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
||||
const onTabPressed = async () => {
|
||||
let params = tableRef.value.params;
|
||||
|
||||
if (
|
||||
Object.keys(params).length > 0 &&
|
||||
JSON.stringify(params) !== JSON.stringify(lastParams)
|
||||
) {
|
||||
Object.assign(lastParams, params);
|
||||
|
||||
await arrayData.addFilter({ filter: { where: params } });
|
||||
}
|
||||
params = {};
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -277,7 +260,6 @@ const onTabPressed = async () => {
|
|||
:row-click="({ entryFk }) => tableRef.redirect(entryFk)"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
@keydown.tab="onTabPressed"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue