(js) Improve sg-search directive

This commit is contained in:
Francis Lachapelle committed 2016-02-25 10:10:53 -05:00
1 parent e5fe211dcd
commit b294c5381a
3 files changed
+6 -3

No files matched your search

@@ -123,7 +123,7 @@
input = form[vm.inputName],
rawSearchText = input.$viewValue;
if (vm.allowDot && rawSearchText == '.' || form.$valid) {
if (vm.allowDot && rawSearchText == '.' || form.$valid && rawSearchText) {
if (rawSearchText == '.')
// Ignore the minlength constraint when using the dot operator
input.$setValidity('minlength', true);