Comments (5)
Hi @leobm
Thanks for this report. I'll set up a demo and try it out. There's likely going to be some edge cases that need to be worked out, or that might just not work. Good to figure them out though.
Any difference if you use $component()
? That works slightly different behind the scenes.
I might not get back to you until tomorrow though.
from alpine-magic-helpers.
I put your code here with the source code https://codepen.io/KevinBatdorf/pen/8dd61ec92f00eb90ba48eee6bc6b8665?editors=1010
from alpine-magic-helpers.
Okay, I figured out the bug. It's related to $el.parentNode.closest('[x-data]')
which isn't super reliable to find the parent in hindsight.
Here's a clear example of the bug where you can see it reaching for the wrong component:
https://codepen.io/KevinBatdorf/pen/0b3e58b7f8d6bd1d18b1d6e8e424c908?editors=1010
It's late where I am now though so it won't be until tomorrow before I can implement a fix, so for now I'd suggest switching to $component()
, unless you were just testing it out :)
Thank you again though, and I'll update here when I have more info.
from alpine-magic-helpers.
Hi, Have a fix if you want to test it out. Will merge it in later
https://codepen.io/KevinBatdorf/pen/b9d3e9746f1156495415f5306b5059bd?editors=1000
from alpine-magic-helpers.
Fixed in 0.3.1
Feel free to open the issue if still experiencing issue. Thanks again for the issue
from alpine-magic-helpers.
Related Issues (20)
- $get and $post are not defined HOT 2
- autoIntervalTest in $interval doesn't resume/restart properly HOT 11
- Test failing with latest Alpine version HOT 3
- Using $parent in for loop data that has been fetched (to be eventually used in an interval) HOT 9
- iterator not working in table? HOT 2
- $parent not working with x-for HOT 6
- Problem using $scroll with $watch
- Hi Support AlpineJS V3 alpine-collective..? HOT 16
- RFC: Adding a $select magic helper HOT 4
- Scroll not working when loaded from another livewire component HOT 3
- Seems like $scroll smooth is not smooth anymore? HOT 4
- Missing source of script tag in installation-guide? HOT 1
- scroll not working in alpine.js v3 HOT 1
- $scroll produces promise error HOT 2
- [Question] Finding unused translations HOT 1
- Fallback for missing translations HOT 4
- Installation suggestion is incorrect
- [V3] Installation suggestion incorrect? HOT 1
- Cannot install HOT 1
- Installing doesn't work in V3 – callback is not a function HOT 6
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-magic-helpers.