From 235cc2d8f6c526e6edf7cc3e929abc7384b85a77 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 21 Sep 2017 13:10:30 +0200 Subject: [PATCH] refactoring autocomplete: input readonly and autofucos on search input --- client/core/src/autocomplete/autocomplete.html | 2 +- client/core/src/autocomplete/autocomplete.js | 1 + client/core/src/drop-down/drop-down.js | 14 +++++++++++++- client/core/src/textfield/textfield.html | 1 + client/core/src/textfield/textfield.js | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/client/core/src/autocomplete/autocomplete.html b/client/core/src/autocomplete/autocomplete.html index 976deb095..65150f09c 100644 --- a/client/core/src/autocomplete/autocomplete.html +++ b/client/core/src/autocomplete/autocomplete.html @@ -1,5 +1,5 @@ - + { + inputFilterSearch.focus(); + }); + } + } get search() { return this._search; } diff --git a/client/core/src/textfield/textfield.html b/client/core/src/textfield/textfield.html index 0d2d93d33..3872ee894 100644 --- a/client/core/src/textfield/textfield.html +++ b/client/core/src/textfield/textfield.html @@ -6,6 +6,7 @@ ng-model="$ctrl.value" vn-validation="{{$ctrl.rule}}" ng-disabled="$ctrl.disabled" + ng-readonly="$ctrl.readonly" />
clear diff --git a/client/core/src/textfield/textfield.js b/client/core/src/textfield/textfield.js index 9dc223506..9272952c8 100644 --- a/client/core/src/textfield/textfield.js +++ b/client/core/src/textfield/textfield.js @@ -20,7 +20,6 @@ export default class TextfieldController extends Component { this.focus = false; this.hasInfo = Boolean(this.$attrs.info); this.info = this.$attrs.info || null; - componentHandler.upgradeElement($element[0].firstChild); } @@ -56,6 +55,7 @@ module.component('vnTextfield', { label: '@?', name: '@?', disabled: '