Hide clear icon on disabled components autocomplete and textfield

This commit is contained in:
Joan Sanchez 2018-03-26 12:24:34 +02:00
parent 1cb9432922
commit e38999acfa
3 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@
</input>
<div class="icons">
<vn-icon
ng-show="!$ctrl.disabled"
icon="clear"
class="clear"
ng-click="$ctrl.onClearClick($event)"

View File

@ -1,5 +1,5 @@
import ngModule from '../../module';
import Component from '../../lib/component';
import Input from '../../lib/input';
import './style.scss';
/**
@ -11,7 +11,7 @@ import './style.scss';
* @property {Object} intialData A initial data to avoid the server request used to get the selection
* @property {Boolean} multiple Wether to allow multiple selection
*/
export default class Autocomplete extends Component {
export default class Autocomplete extends Input {
constructor($element, $scope, $http, $transclude) {
super($element, $scope);
this.$http = $http;

View File

@ -20,7 +20,7 @@
info_outline
</i>
<i class="material-icons pointer"
ng-show="$ctrl.hasValue && ($ctrl.hasFocus || $ctrl.hasMouseIn)"
ng-show="!$ctrl.disabled && $ctrl.hasValue && ($ctrl.hasFocus || $ctrl.hasMouseIn)"
ng-click="$ctrl.clear()">
clear
</i>