Skip to content

Commit

Permalink
remove deprecated hideInput() and showInput()
Browse files Browse the repository at this point in the history
  • Loading branch information
oyejorge committed Oct 26, 2023
1 parent 16f4de2 commit 7bd39ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
23 changes: 3 additions & 20 deletions src/tom-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
}

// ensure control has focus
self.hideInput();
self.inputState();
if (!self.isFocused) {
self.focus();
}
Expand Down Expand Up @@ -1230,7 +1230,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){

if( !activeItems.length ) return;

self.hideInput();
self.inputState();
self.close();

self.activeItems = activeItems;
Expand Down Expand Up @@ -1266,23 +1266,6 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
self.wrapper.classList.toggle('input-hidden', self.isInputHidden );
}

/**
* Hides the input element out of view, while
* retaining its focus.
* @deprecated 1.3
*/
hideInput() {
this.inputState();
}

/**
* Restores input visibility.
* @deprecated 1.3
*/
showInput() {
this.inputState();
}

/**
* Get the input value
*/
Expand Down Expand Up @@ -2324,7 +2307,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
self.setTextboxValue();

if (self.settings.mode === 'single' && self.items.length) {
self.hideInput();
self.inputState();
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/tests/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@
});

it_n('should not hide external control', function() {
test.instance.hideInput();
test.instance.inputState();
assert.equal(test.instance.isInputHidden, false);
});

Expand Down

0 comments on commit 7bd39ea

Please sign in to comment.