Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear all when minlength = 0 #443

Open
Khanh-Goku opened this issue Nov 1, 2016 · 1 comment
Open

clear all when minlength = 0 #443

Khanh-Goku opened this issue Nov 1, 2016 · 1 comment

Comments

@Khanh-Goku
Copy link

let minlength = 0
press Ctrl A to select all text
press Delete to clear text

expected: selected-object = null
actual: selected-object does not change

@sayoojvv
Copy link

this worked for me...

scope.inputChangeHandler = function(str) {
if (str.length < minlength) {
cancelHttpRequest();
clearResults();
}
else if (str.length === 0 && minlength === 0) {
scope.selectedObject = '';
showAll();
}

    if (scope.inputChanged) {
      str = scope.inputChanged(str);
    }
    return str;
  };scope.inputChangeHandler = function(str) {
    if (str.length < minlength) {
      cancelHttpRequest();
      clearResults();
    }
    else if (str.length === 0 && minlength === 0) {
  scope.selectedObject = ''; //fix
      showAll();
    }

    if (scope.inputChanged) {
      str = scope.inputChanged(str);
    }
    return str;
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants