Closed
Description
I have a Modal
component in which I include another Button
component with data-*
attributes to control the modal
{# Modal.html.twig #}
<twig:Button :class="btn_toggle_class" :data-modal-target="id" :data-modal-toggle="id">
{{- btn_toggle_label|trans -}}
</twig:Button>
<div{{ attributes.defaults({
id: id,
'data-modal-placement': placement.value,
tabindex: '-1',
'aria-hidden': 'true',
class: 'fixed top-0 left-0 right-0 z-50 hidden w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full'
}) }}>
</div>
When the component is rendered, I get a SyntaxError
exception.
If i replace data-*
attribute with a camelCase syntax ( :dataModalTarget="id"
), the attribute is displayed in lower case (datamodaltarget="id"
)
Metadata
Metadata
Assignees
Labels
No labels