We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8eef82 commit 3f86080Copy full SHA for 3f86080
assets/components/common/Carousel.vue
@@ -46,6 +46,16 @@ const scrollToItem = (index: number) => {
46
};
47
48
const { pause, resume } = watchPausable(activeId, (v) => {
49
+ if (activeId.value) {
50
+ const index = cards.value?.map((c) => c.id).indexOf(activeId.value) ?? -1;
51
+ if (index !== -1) {
52
+ console.log("watching", activeId.value);
53
+ scrollToItem(index);
54
+ }
55
56
+});
57
+
58
+watchOnce(cards, () => {
59
if (activeId.value) {
60
const index = cards.value?.map((c) => c.id).indexOf(activeId.value) ?? -1;
61
if (index !== -1) {
0 commit comments