Skip to content

Custom Properties does not work when optgroup on a select #1155

@jbender0

Description

@jbender0

I'm using custom properties (inline data attribute) to display a description and thumbnail image. This works fine on a regular select field. But when I add optgroup within the select, it falls apart and only loads the option label. All custom properties are returned as undefined.

The custom property attribute is valid JSON and when I turn off the Choices script it loads correctly with optgroup just fine. So there's definitely a bug in Choices.

Here's a screenshot of it working with no optgroup and after optgroup is added (no thumbnails or custom properties).

Screenshot 2024-05-17 at 1 38 32 PM
Screenshot 2024-05-17 at 1 40 54 PM

Using macOS latest Chrome (v124.0).

Anyone else ran into this bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions