I've been working with Flickity in my Vue 3 app and it works fine when I use a hardcoded HTML carousel with static cells. I need to add cells programmatically at runtime, however, and I can't get the flickity API to work correctly.
I'm trying to follow the append() example but I get the error flickity.js?1385:72 Bad element for Flickity: .carousel in my inspector during runtime. I tried to follow the solution here and here but neither have been able to run successfully, it looks like its due to Typescript errors on the Flickity lib. I also installed @types/flickity, fyi.
I've been working with Flickity in my Vue 3 app and it works fine when I use a hardcoded HTML carousel with static cells. I need to add cells programmatically at runtime, however, and I can't get the flickity API to work correctly.
I'm trying to follow the append() example but I get the error
flickity.js?1385:72 Bad element for Flickity: .carousel
in my inspector during runtime. I tried to follow the solution here and here but neither have been able to run successfully, it looks like its due to Typescript errors on the Flickity lib. I also installed @types/flickity, fyi.What can I do to fix my append logic below?