Rename _clearChoices to clearChoices

This commit is contained in:
Hans Lemuet 2019-03-13 10:05:38 +01:00
parent bbbc31594c
commit fc9bca2ece
No known key found for this signature in database
GPG key ID: 6EABF1FFDDFA8032
2 changed files with 7 additions and 7 deletions

View file

@ -417,7 +417,7 @@ class Choices {
// Clear choices if needed
if (replaceChoices) {
this._clearChoices();
this.clearChoices();
}
this.containerOuter.removeLoadingState();
@ -448,6 +448,10 @@ class Choices {
return this;
}
clearChoices() {
this._store.dispatch(clearChoices());
}
clearStore() {
this._store.dispatch(clearAll());
return this;
@ -1729,10 +1733,6 @@ class Choices {
}
}
_clearChoices() {
this._store.dispatch(clearChoices());
}
_addGroup({ group, id, valueKey = 'value', labelKey = 'label' }) {
const groupChoices = isType('Object', group)
? group.choices

View file

@ -1339,14 +1339,14 @@ describe('choices', () => {
addChoiceStub = stub();
containerOuterRemoveLoadingStateStub = stub();
instance._clearChoices = clearChoicesStub;
instance.clearChoices = clearChoicesStub;
instance._addGroup = addGroupStub;
instance._addChoice = addChoiceStub;
instance.containerOuter.removeLoadingState = containerOuterRemoveLoadingStateStub;
});
afterEach(() => {
instance._clearChoices.reset();
instance.clearChoices.reset();
instance._addGroup.reset();
instance._addChoice.reset();
instance.containerOuter.removeLoadingState.reset();