Skip to content

Setting attribute "data-placeholder--text" overrides placeholder on all selects #3485

@fkranenburg

Description

@fkranenburg

When defining a default placeholder, I expect to be able to override it with custom attributes. I initialize the control like this:

$(".select2control").select2({
        placeholder: {
          id: "-1",
          text: "--Select something (default placeholder)--"
        },
});

When I set the attribute data-placeholder--text on one of all selects on the page, it will globally replace all placeholders of all selects.

Please see this fiddle to see what happens
https://jsfiddle.net/2xt0ohvv/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions