Browse Source

fix: reset children excluded list offset when changing filter query

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

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

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

Loading…
Cancel
Save