vue icon indicating copy to clipboard operation
vue copied to clipboard

What is the current status of this plugin?

Open mityukov opened this issue 4 years ago • 4 comments

Hi, yesterday I did some upgrade:

  1. Alpine 2 to Alpine 3
  2. Livewire 2.4.4 to Livewire 2.5.3

After the upgrade, some of Livewire widgets stopped working with these errors: image

I've also found a strange difference between the tags in "Page source" and in "Elements" panel: image

Finally, I've tried to take my Livewire components outside all Vue components (including the <Root> one) — after this the Livewire components started working.

Isn't this plugin designed to fight Vue/Liveiwire conflicts? Just, I find it strange why it stopped working after I upgraded Livewire…

Other deps:

  • VueJS: v2.6.12
  • Livewire/Vue: v0.3.x from CDN

mityukov avatar Jul 12 '21 09:07 mityukov

I had the same issue when I upgraded the livewire.

I've just downgraded to 2.4.4 and it works fine now.

BMasquio avatar Jul 12 '21 15:07 BMasquio

will 2.4.4 work nicely with alpine 3?

mityukov avatar Jul 12 '21 15:07 mityukov

Don't know. I'm only with Vue.js, not Alpine.

BMasquio avatar Jul 12 '21 15:07 BMasquio

Downgraded to Livewire v2.4.4 — now, @entangle doesn't work…

<!-- calling the component -->
<x-input.cal-date class="w-56" wire:model="startDateDmy" />
<!-- the component -->
<div
    x-data="inputDate(@entangle($attributes->wire('model')), 'DD.MM.YYYY')"
    class=""
>
    <input
        {{
            $attributes->whereDoesntStartWith('wire:model')
                ->merge(['class' => 'px-8 h-control-h rounded-sm border border-gray-f2 focus:border-cal-lighter text-cal-lg font-medium transition duration-150 ease-in-out'])
        }}
        x-ref="input"
    />
</div>
// inputDate  implementation
document.addEventListener('alpine:init', () => {
    Alpine.data('inputDate', (wire, format, minDate) => ({
        value: wire, // <<< here we suppose to have the entangled value, and it worked before the downgrade

        format: format,

        minDate: minDate,
        //  ...

The error message:

index.js:31 Uncaught (in promise) TypeError: Cannot read property '$wire' of undefined
    at Livewire.value (index.js:31)
    at eval (eval at jr (cdn.min.js:1), <anonymous>:3:58)
    ...

mityukov avatar Jul 12 '21 19:07 mityukov

Cannot work without Vue, Livewire is just not enough, any updates on this plugin please? I have to stop using Livewire as Vue is just too important in many projects. We need to be able to use both technologies in project please, without this....nightmare to have only livewire.

Thanks!

Benoit1980 avatar Nov 26 '22 22:11 Benoit1980