Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

ctrl.search not being cleared using angular 1.3 #434

Closed
yaneq opened this issue Nov 24, 2014 · 9 comments
Closed

ctrl.search not being cleared using angular 1.3 #434

yaneq opened this issue Nov 24, 2014 · 9 comments

Comments

@yaneq
Copy link

yaneq commented Nov 24, 2014

After entering text and choosing an option, the entered text is not being cleared from the input

Demo: http://plnkr.co/edit/6nrzYlaMEaDsLo5X3EMp

@yaneq yaneq changed the title $selected not being cleared using angular 1.3 ctrl.search not being cleared using angular 1.3 Nov 24, 2014
@yaneq
Copy link
Author

yaneq commented Nov 24, 2014

The issue seems to be related to the $observe not being available in 1.3, so these lines are never called. I use this work-around for now:

module.directive('uiSelect', function () {
  return {
    restrict: 'EA',
    require: 'uiSelect',
    link: function($scope, $element, $attributes, ctrl) {
      ctrl.resetSearchInput = true;
    }
  };
});

@belgattitude
Copy link

Thanks for the work-around. Confirmed to work with angular 1.3.2 as well.

@yudarik
Copy link

yudarik commented Dec 3, 2014

Is this issue fixed already on the latest version #0.8.4?

@belgattitude
Copy link

Seems both 0.8.4 and 0.9.0 are affected.

@mackayj
Copy link

mackayj commented Dec 4, 2014

Still an issue with the latest 0.9.1: http://plnkr.co/edit/ylNOJSC7ZsG01sUSqUMg

@wzoom
Copy link

wzoom commented Dec 9, 2014

On version 0.8.3 this attribute works just fine for me:
<ui-select reset-search-input="true">...

@yaneq
Copy link
Author

yaneq commented Dec 9, 2014

Thanks @wzoom, adding the attribute works as well. I prefer this in comparison to my previous work around.

@mlim1972
Copy link

Works on 0.9.4 as well; however, if close-on-select="false" is used regardless of reset-search-input true/false, the problems comes back.

@dimirc
Copy link
Contributor

dimirc commented Feb 26, 2015

Should be fixed with #703

@dimirc dimirc closed this as completed Feb 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants