How do you add a class to menu items that are not expanded (or don't have children)?
{% for item in items %}
{%
set classes = [
item.is_expanded ? 'menu-item--expanded dropdown panel simple-dropdown',
item.is_collapsed ? 'collapsed',
item.in_active_trail ? 'active',
]
%}
<li{{ item.attributes.addClass(classes) }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
Edit: Can anyone point me into getting the answer provided, implemented in my example?