Skip to content

Refresh Select2 without triggering change event #3620

Closed
@omggga

Description

@omggga

In Select2 v4 documentation recommended to reset select by setting value to empty value and triggering event.

$('#id').val('').trigger('change')

But how to reset dropdown select to placeholder without triggering change event and replacing tons of dom elements? Something like

$('#id').select2('refresh')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions