Merge branch 'develop' into feat/contacts-redesign

This commit is contained in:
Sivin Varghese
2024-11-21 22:55:36 +05:30
committed by GitHub
@@ -1,5 +1,4 @@
<script setup>
// [VITE] TODO: Test this component across different screen sizes and usages
import { ref, provide, onMounted, computed } from 'vue';
import { useEventListener } from '@vueuse/core';
@@ -17,15 +16,10 @@ const props = defineProps({
const emit = defineEmits(['change']);
const hasScroll = ref(false);
// TODO: We may not this internalActiveIndex, we can use activeIndex directly
// But right I'll keep it and fix it when testing the rest of the codebase
const internalActiveIndex = ref(props.index);
// Create a proxy for activeIndex using computed
const activeIndex = computed({
get: () => internalActiveIndex.value,
get: () => props.index,
set: newValue => {
internalActiveIndex.value = newValue;
emit('change', newValue);
},
});