Skip to content
Snippets Groups Projects

Issue #3423235 by Grimreaper: Accordion: Test default on boolean

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -2,7 +2,7 @@
{% set attributes = attributes.addClass('accordion-' ~ variant|lower|replace({'_': '-'})) %}
{% endif %}
{% set accordion_id = accordion_id|default("accordion-" ~ random()) %}
{% set keep_open = keep_open|default(false) ? 'true' : 'false' %}
{% set keep_open = keep_open ? 'true' : 'false' %}
<div{{ attributes.addClass('accordion').setAttribute('id', accordion_id).setAttribute('data-usb-keep-open', keep_open) }}>
{{ content }}
</div>
Loading