vue icon indicating copy to clipboard operation
vue copied to clipboard

Polling doesn't instantiate Vue components.

Open liamwalder opened this issue 5 years ago • 0 comments

Hello.

I have some markup similar the example below. Initially our $app variable will not be running and the first instance off spinner in the first conditional will render correctly.

After 10 seconds, our $app will be marked as running, checked via polling, the first <spinner> will be removed and the second <spinner> will be added to the DOM except it isn't converted to the a Vue element, it is rendered in the HTML plain markup as <spinner></spinner>.

I think this may be something to do with Vue elements not instantiating if we are polling on a Livewire component.

Thanks for you time and hope you can help.

<div {{ !$app->isRunning() ? 'wire:poll.10000ms' : ''}}>
    @if(!$app->isRunning())
        <spinner></spinner>
    @endif
    @if($app->isRunning())
        <spinner></spinner>
    @endif
</div>

liamwalder avatar Oct 30 '20 16:10 liamwalder