Merge branch 'dev' of https://git.verdnatura.es/salix into dev
* 'dev' of https://git.verdnatura.es/salix: textfield canvia las cadenas vacias a null
This commit is contained in:
commit
8cad612a59
|
@ -25,6 +25,7 @@ export default class Textfield extends Component {
|
|||
|
||||
let div = this.element.firstChild;
|
||||
componentHandler.upgradeElement(div);
|
||||
|
||||
}
|
||||
link($scope, $attrs) {
|
||||
let mdlTextField = this.element.firstChild.MaterialTextfield;
|
||||
|
@ -32,9 +33,12 @@ export default class Textfield extends Component {
|
|||
|
||||
$scope.$watch($attrs.model,
|
||||
() => mdlTextField.updateClasses_());
|
||||
|
||||
let $input = angular.element( this.input);
|
||||
$input.controller('ng-model').$parsers.push(value => value === '' ? null : value);
|
||||
}
|
||||
onClearClick() {
|
||||
this.input.value = '';
|
||||
this.input.value = null;
|
||||
this.checkValue();
|
||||
|
||||
let event = this.document.createEvent('HTMLEvents');
|
||||
|
|
Loading…
Reference in New Issue