Comments (3)
Here's a simplified version of my Livewire blade template:
@foreach($models as $model)
<tr>
<td>{{ $model->id }}</td>
<td>{{ $model->name }}</td>
<td x-data="{ isDeleting: false }">
<button @click="isDeleting = true">Delete</button>
<div class="modal" x-show="isDeleting">
<div class="overlay" @click="isDeleting = false"></div>
<div class="modal-content">
<p>Delete {{ $model->name }} model?</p>
<button wire:click="delete({{ $model->id }})" @click="isDeleting = false">Delete</button>
</div>
</div>
</td>
</tr>
@endforeach
from alpine-plugin.
This is the order in which I've imported assets:
@livewireScripts {{-- version 0.7.4 --}}
<script src="https://cdn.jsdelivr.net/gh/livewire/alpine-plugin@v0.1.0/dist/livewire-alpine-plugin.js"></script>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.0.0/dist/alpine.js" defer></script>
from alpine-plugin.
I red the code for alpine plugin and alpine's index.js and figured a hacky way to fix this. I put an x-data
attribute on my livewire components root element.
But this should work without a hack. if the root element isn't an alpine component but some parts of new html returned by livewire contains tags with x-data
they should be initialized.
from alpine-plugin.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpine-plugin.