#865 hacer que los eventos de guardado funcionen correctamente
This commit is contained in:
parent
e60d485111
commit
5f4dfe6d75
|
@ -30,13 +30,19 @@ export default class Textfield extends Input {
|
|||
});
|
||||
|
||||
this.input.addEventListener('blur', () => {
|
||||
if (this.onChange && !this.cancelled && (this.oldValue != this.value))
|
||||
if (this.onChange && !this.cancelled && (this.oldValue != this.value)) {
|
||||
this.onChange();
|
||||
else
|
||||
this.saveOldValue();
|
||||
} else
|
||||
this.cancelled = false;
|
||||
});
|
||||
}
|
||||
|
||||
$postLink() {
|
||||
this.saveOldValue();
|
||||
console.log(this.value, this.oldValue);
|
||||
}
|
||||
|
||||
saveOldValue() {
|
||||
this.oldValue = this.value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue