Help with ExtraAlpineAttributes
Can someone help me add extra alpine attributes and/or functions in a form component?
In this case, I tried this from a
index.blade.php
16 Replies
It works the way I want, but how can I implement this using
->extraAlpineAttributes()?
Is it even possible?
Even with
I still cant the new x-data when doing inspect element
Section doesn’t support extraAlpineAttributes based on what I’m seeing in the blade file.
Yeah, I gured out so
But, it does support from a form
Like this
the way I structrured it is obv wrong, because I dont see my components in the html
dd() getExtraAlpineAttributes() and see if your data isn’t matching up. Also you’re merging the same thing 3 times.
Oh nah, I already cleaned up the other files
And I also did dd() and this is the result
Crazy thought. Does it have to be on the section? Could you wrap the section in a Div with all your alpine functionality?
Yeahh, it does. I might sound crazy but this is what I want to do:
I want to create something like a custom section
Its still a bit janky, but I want to get the primary functionality there
Crazy is what makes it fun.
I’m not seeing anything obviously wrong with your code.
Yeah exactly 😅
Ive been working on this all day
Ah, hmmm
Thing is, I read through the code of the callback
And it I dont see anything wrong with it
I was hoping you woiuld know 😂
I’m not see anything either. If I get some time tomorrow I’ll see it I can figure it out.
Cool! Thank you
If you need a reproduction repo, lemme know:)
Yes please.
I don’t want to recreate all that js.
Yeah, I feel you 😅
@Matthew I am assuming you got this solved, but you definitely cant use x-data with extraAttributes or extraAlpineAttributes to set x-data anymore since its hardcoded with. you can though set any other alpine attribute like x-show, etc. What I had to do was simple put the
Section::make() in a . Hopefully this helps you and/or someone else that stumbles upon it. It was definitely possible before the collapse feature was added as I had to change my code after a filament update.