Skip to content

Commit

Permalink
Commit clearStore change
Browse files Browse the repository at this point in the history
  • Loading branch information
Xon committed Sep 4, 2024
1 parent 0864f2d commit 79b795f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scripts/choices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,14 @@ class Choices {
return this;
}

clearStore(): this {
clearStore(clearOptions: boolean = true): this {
this._stopSearch();

this.passedElement.element.replaceChildren('');
if (clearOptions) {
this.passedElement.element.replaceChildren('');
}
this.itemList.element.replaceChildren('');
this.choiceList.element.replaceChildren('');
this._stopSearch();
this._store.reset();
this._lastAddedChoiceId = 0;
this._lastAddedGroupId = 0;
Expand Down

0 comments on commit 79b795f

Please sign in to comment.