We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b044b41 commit 98229e9Copy full SHA for 98229e9
dist/select.js
100755
100644
@@ -349,15 +349,23 @@
349
ctrl.sizeSearchInput();
350
} else {
351
ctrl.selected = item;
352
+ var selectedFromDropdown = true;
353
}
- ctrl.close(skipFocusser);
354
+ ctrl.close(skipFocusser, selectedFromDropdown);
355
356
};
357
358
// Closes the dropdown
- ctrl.close = function(skipFocusser) {
359
+ ctrl.close = function(skipFocusser, selectedFromDropdown) {
360
if (!ctrl.open) return;
- _resetSearchInput();
361
+ if (ctrl.search) {
362
+ ctrl.selected = { name: ctrl.search, id: null} // id set as null for form validation
363
+ }
364
+ else {
365
+ if (!selectedFromDropdown){
366
+ ctrl.selected = undefined;
367
368
369
ctrl.open = false;
370
if (!ctrl.multiple){
371
$timeout(function(){
0 commit comments