|
|
|
@ -1,9 +1,22 @@
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { ReloadViewDataHookInj, computed, inject, onClickOutside, ref, useSmartsheetStoreOrThrow } from '#imports' |
|
|
|
|
import { |
|
|
|
|
ActiveViewInj, |
|
|
|
|
ReloadViewDataHookInj, |
|
|
|
|
computed, |
|
|
|
|
inject, |
|
|
|
|
onClickOutside, |
|
|
|
|
ref, |
|
|
|
|
useFieldQuery, |
|
|
|
|
useSmartsheetStoreOrThrow, |
|
|
|
|
} from '#imports' |
|
|
|
|
|
|
|
|
|
const reloadData = inject(ReloadViewDataHookInj)! |
|
|
|
|
|
|
|
|
|
const { search, meta } = useSmartsheetStoreOrThrow() |
|
|
|
|
const { meta } = useSmartsheetStoreOrThrow() |
|
|
|
|
|
|
|
|
|
const activeView = inject(ActiveViewInj, ref()) |
|
|
|
|
|
|
|
|
|
const { search, loadFieldQuery } = useFieldQuery(activeView) |
|
|
|
|
|
|
|
|
|
const isDropdownOpen = ref(false) |
|
|
|
|
|
|
|
|
@ -18,6 +31,16 @@ const columns = computed(() =>
|
|
|
|
|
})), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => activeView.value?.id, |
|
|
|
|
(n, o) => { |
|
|
|
|
if (n !== o) { |
|
|
|
|
loadFieldQuery(activeView) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ immediate: true }, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
function onPressEnter() { |
|
|
|
|
reloadData.trigger() |
|
|
|
|
} |
|
|
|
|