Laravel Livewire component not refreshing/reloading automatically after refreshing it

后端 未结 1 1431
青春惊慌失措
青春惊慌失措 2020-12-11 16:20

So, I\'m currently using Laravel Livewire in one of my projects. But when I try emit an event from one component to another component by magic mathod $refresh ,

1条回答
  •  青春惊慌失措
    2020-12-11 16:49

    So it seems I've write my component blade view in wrong way.

    all things on refreshed component should be wrapped in one div element like this:

    {{-- Anything you want to do --}}

    previously my blade file was like. Which is Wrong

    {{ -- some dom elements -- }}
    {{ -- some other dom elements -- }}

    but that should be like.

    {{ -- some dom elements -- }}
    {{ -- some other dom elements -- }}

    So Whatever you write, that should be inside ONE PARENT DIV ELEMENT

    0 讨论(0)
提交回复
热议问题