Hide clear icon on disabled components autocomplete and textfield
This commit is contained in:
parent
1cb9432922
commit
e38999acfa
|
@ -8,6 +8,7 @@
|
|||
</input>
|
||||
<div class="icons">
|
||||
<vn-icon
|
||||
ng-show="!$ctrl.disabled"
|
||||
icon="clear"
|
||||
class="clear"
|
||||
ng-click="$ctrl.onClearClick($event)"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue