<cds-dropdown {{ widget.attr_string|safe }}>
{% for group_name, group_choices, group_index in widget.optgroups %}{% for option in group_choices %}<cds-dropdown-item value="{{ option.value }}"{% if option.selected %} selected{% endif %}>{{ option.label }}</cds-dropdown-item>
{% endfor %}{% endfor %}</cds-dropdown>