Skip to content

Specifying a Title and OptGroups creates a redundant divider #2380

@tjmay1981

Description

@tjmay1981

Specifying the title attribute when optgroups are being used results in a redundant <li class="dropdown-divider optgroup-1div"> being added to the start of the list.

Reproduced in Firefox, Chrome and Microsoft Edge on Windows 10

bootstrap-select v1.13.12
jQuery v3.4.1
Bootstrap v4.4.1

Demonstrated here: https://plnkr.co/edit/RHA12B5OFfxR2jqg5EEQ?p=preview

This seems to be due to the programmatically added <option class="bs-title-option"> being considered as part of the genuine structure of the list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions