Browse Source

fix: reset children excluded list offset when changing filter query

pull/7919/head
Pranav C 8 months ago
parent
commit
54547634e8
  1. 7
      packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue
  2. 1
      packages/nc-gui/composables/useLTARStore.ts

7
packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue

@ -259,6 +259,11 @@ onUnmounted(() => {
childrenExcludedListPagination.query = '' childrenExcludedListPagination.query = ''
window.removeEventListener('keydown', linkedShortcuts) window.removeEventListener('keydown', linkedShortcuts)
}) })
const onFilterChange = () => {
childrenExcludedListPagination.page = 1;
resetChildrenExcludedOffsetCount()
}
</script> </script>
<template> <template>
@ -289,7 +294,7 @@ onUnmounted(() => {
:placeholder="`${$t('general.searchIn')} ${relatedTableMeta?.title}`" :placeholder="`${$t('general.searchIn')} ${relatedTableMeta?.title}`"
class="w-full !rounded-md nc-excluded-search xs:min-h-8" class="w-full !rounded-md nc-excluded-search xs:min-h-8"
size="small" size="small"
@change="childrenExcludedListPagination.page = 1" @change="onFilterChange"
@keydown.capture.stop=" @keydown.capture.stop="
(e) => { (e) => {
if (e.key === 'Escape') { if (e.key === 'Escape') {

1
packages/nc-gui/composables/useLTARStore.ts

@ -66,6 +66,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
query: '', query: '',
size: 10, size: 10,
}) })
const childrenExcludedOffsetCount = ref(0) const childrenExcludedOffsetCount = ref(0)
const childrenListPagination = reactive({ const childrenListPagination = reactive({

Loading…
Cancel
Save