Closed romastolbov closed 7 months ago
try defineComponent instead of computed
const list = ref([]);
const activeIndex = ref(0)
useTippy(triggerRef, {
content: defineComponent(() => {
return () => h(ComponentList, {
items: list.value,
activeIndex: activeIndex.value,
onHover: (value) => { activeIndex.value = value }
})
})
const list = ref([]); const activeIndex = ref(0) useTippy(triggerRef, { content: computed(() => { return h(ComponentList, { items: list.value, activeIndex: activeIndex.value, // always 0 onHover: (value) => { activeIndex.value = value } }) })
Why props
items
andactiveIndex
not reactive (not update in tooltip after onHover event) in componentComponentList?
fixed in 6.4.1
, but better to use defineComponent
const list = ref([]); const activeIndex = ref(0) useTippy(triggerRef, { content: computed(() => { return h(ComponentList, { items: list.value, activeIndex: activeIndex.value, // always 0 onHover: (value) => { activeIndex.value = value } }) })
Why props
items
andactiveIndex
not reactive (not update in tooltip after onHover event) in componentComponentList?
fixed in
6.4.1
, but better to usedefineComponent
@KABBOUCHI Yes, everything is working as expected now, thank you so much for the quick response!
Why props
items
andactiveIndex
not reactive (not update in tooltip after onHover event) in componentComponentList?