Attributes tag #11638
Attributes tag
#11638
Replies: 1 comment
-
As a workaround, I enhanced the Attributes filter with a keyword to unset the attributes on the child partial: return collect($this->context->get('view', []))
->except($except)
->filter(fn ($value, $key) => Str::startsWith($key, ['data-', 'x-', '@', 'item']) && $value !== 'unset') // filter keyword
->map(fn ($value, $key) => $key . '="' . $value . '"')
->join(' '); {{ partial:child attribute="unset" }} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I got this snippet for an Attribute tag somewhere:
That works great, but the big issue is that it renders the filtered attributes, if they are present on the parent too.
For example:
Results in:
Is there a way to not render attributes from the parent?
Beta Was this translation helpful? Give feedback.
All reactions