F
Filament13mo ago
awsqed

Single/double quote is encoded when using extraAttributes

I'm following the doc: https://filamentphp.com/docs/3.x/widgets/stats-overview#adding-extra-html-attributes-to-a-stat But it results in quote is being encode instead of what I expect. Code
return $action->extraAttributes([
'x-on:click.stop' => "\$dispatch('next-wizard-step', {statePath: 'data'})"
], true);
return $action->extraAttributes([
'x-on:click.stop' => "\$dispatch('next-wizard-step', {statePath: 'data'})"
], true);
Expectation
x-on:click.stop="$dispatch('next-wizard-step', {statePath: 'data'})"
x-on:click.stop="$dispatch('next-wizard-step', {statePath: 'data'})"
Actual
x-on:click.stop="$dispatch('next-wizard-step', {statePath: 'data'})"
x-on:click.stop="$dispatch('next-wizard-step', {statePath: 'data'})"
Solution:
try new HtmlString("...")
Jump to solution
3 Replies
mxc
mxc13mo ago
I also have this issue. Did you find a solution?
Solution
LeandroFerreira
LeandroFerreira13mo ago
try new HtmlString("...")
mxc
mxc13mo ago
Thanks will give it a try.
Want results from more Discord servers?
Add your server