Skip to content

Using "native: true" and calling refresh() destroys the original select #125

@SeyelentEco

Description

@SeyelentEco

When using the option: {native: true} and then calling "refresh()" because the data has changed, the destroy function deletes the original select box by calling "self.dropdownContainer.remove()".

This can be fixed by adding the following lines in the _destroySelectBoxIt function before the "remove()" call.

if (self.options["native"]) {
    self.dropdownContainer.before(self.selectBox);
}

This code will place the select box back where it started and then the rest of the code will work as intended.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions