Skip to content

Commit b32bcf9

Browse files
kbejnarjosephschmitt
authored andcommitted
Fix query being cleared when hideOnChosen is false (#74)
* Fix query being cleared when hideOnChosen is false If the hideOnChosen behavior is turned off, we do not want to clear the typeahead query. This lets users select or deselect options from within the suggestions list, without forcing the list to be reset with every choice. * Update version to 0.7.0
1 parent e6ef6ec commit b32bcf9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngc-omnibox",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "A modern, flexible, Angular 1.x autocomplete library with limited assumptions.",
55
"main": "dist/ngc-omnibox.js",
66
"scripts": {

src/angularComponent/ngcOmniboxController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ export default class NgcOmniboxController {
713713
_onNgModelChange() {
714714
this.hasChoices = !!this.multiple && Array.isArray(this._ngModel) && !!this._ngModel.length;
715715

716-
if (this.requireMatch) {
716+
if (this.requireMatch && this.hideOnChosen !== false) {
717717
this.query = '';
718718
}
719719
}

0 commit comments

Comments
 (0)