Hide clear icon on disabled components autocomplete and textfield
This commit is contained in:
parent
1cb9432922
commit
e38999acfa
|
@ -8,6 +8,7 @@
|
||||||
</input>
|
</input>
|
||||||
<div class="icons">
|
<div class="icons">
|
||||||
<vn-icon
|
<vn-icon
|
||||||
|
ng-show="!$ctrl.disabled"
|
||||||
icon="clear"
|
icon="clear"
|
||||||
class="clear"
|
class="clear"
|
||||||
ng-click="$ctrl.onClearClick($event)"
|
ng-click="$ctrl.onClearClick($event)"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import ngModule from '../../module';
|
import ngModule from '../../module';
|
||||||
import Component from '../../lib/component';
|
import Input from '../../lib/input';
|
||||||
import './style.scss';
|
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 {Object} intialData A initial data to avoid the server request used to get the selection
|
||||||
* @property {Boolean} multiple Wether to allow multiple 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) {
|
constructor($element, $scope, $http, $transclude) {
|
||||||
super($element, $scope);
|
super($element, $scope);
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
info_outline
|
info_outline
|
||||||
</i>
|
</i>
|
||||||
<i class="material-icons pointer"
|
<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()">
|
ng-click="$ctrl.clear()">
|
||||||
clear
|
clear
|
||||||
</i>
|
</i>
|
||||||
|
|
Loading…
Reference in New Issue