diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue index 1b1c18d7d..4bd17124f 100644 --- a/src/components/common/VnSection.vue +++ b/src/components/common/VnSection.vue @@ -2,7 +2,7 @@ import RightAdvancedMenu from './RightAdvancedMenu.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnTableFilter from '../VnTable/VnTableFilter.vue'; -import { onBeforeMount, onMounted, onUnmounted, computed, ref, inject, watch } from 'vue'; +import { onBeforeMount, onMounted, onUnmounted, computed, ref } from 'vue'; import { useArrayData } from 'src/composables/useArrayData'; import { useRoute, useRouter } from 'vue-router'; import { useHasContent } from 'src/composables/useHasContent'; @@ -36,10 +36,6 @@ const $props = defineProps({ type: Object, default: null, }, - filterPanelRef: { - type: Object, - default: null, - }, redirect: { type: Boolean, default: true, @@ -60,9 +56,6 @@ const isMainSection = ref(false); const searchbarId = 'section-searchbar'; const advancedMenuSlot = 'advanced-menu'; const hasContent = useHasContent(`#${searchbarId}`); -// const filterPanel = ref(inject('filterPanel', null)); - -// filterPanel.value = inject('filterPanel', null); onBeforeMount(() => { if ($props.dataKey) @@ -74,26 +67,14 @@ onBeforeMount(() => { }); checkIsMain(); }); -// const filterPanel = ref(inject('filterPanel', null)); onMounted(() => { const unsubscribe = router.afterEach(() => { checkIsMain(); }); - // filterPanel.value = inject('filterPanel', null); onUnmounted(unsubscribe); }); -watch( - () => inject('filterPanel'), - (newValue) => { - if (newValue) { - debugger; - // hacer algo cuando el valor esté disponible - } - }, - { immediate: true }, -); onUnmounted(() => { if (arrayData) arrayData.destroy(); }); @@ -107,10 +88,8 @@ function checkIsMain() { }