preline icon indicating copy to clipboard operation
preline copied to clipboard

pin input plugin not working in nuxt 3.10.1 (tailwind 3.4.1) unless HSStaticMethods.autoInit is called multiple times

Open kindlychung opened this issue 1 year ago • 1 comments

Here is my workaround:

import 'preline/preline';

declare var HSStaticMethods: {
    autoInit(collection?: string | string[]): void;
};

export default defineNuxtPlugin((nuxtApp) => {
    nuxtApp.hook('page:finish', () => {
            setInterval(() => {
                HSStaticMethods.autoInit();
            }, 1000);
    });
});

kindlychung avatar Feb 13 '24 13:02 kindlychung

Here is my workaround:

import 'preline/preline';

declare var HSStaticMethods: {
    autoInit(collection?: string | string[]): void;
};

export default defineNuxtPlugin((nuxtApp) => {
    nuxtApp.hook('page:finish', () => {
            setInterval(() => {
                HSStaticMethods.autoInit();
            }, 1000);
    });
});

Hi! Please also provide the markup, or better yet, upload an example to Stackblitz or a similar service.

olegpix avatar Feb 28 '24 16:02 olegpix