From 7d47757c64414b6b670970e5715ddb1008b9d59c Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 17 Dec 2019 13:03:09 +0100 Subject: [PATCH] fixed claim responsibility --- front/core/components/range/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/front/core/components/range/index.js b/front/core/components/range/index.js index 80410875a..88463e7cf 100644 --- a/front/core/components/range/index.js +++ b/front/core/components/range/index.js @@ -6,6 +6,16 @@ export default class Range extends FormInput { constructor($element, $scope) { super($element, $scope); this.input = this.element.querySelector('input'); + this.input.addEventListener('change', () => this.onValueUpdate()); + } + + get field() { + return super.field; + } + + set field(value) { + this.input.value = value; + super.field = value; } get max() { @@ -35,6 +45,11 @@ export default class Range extends FormInput { refreshTabIndex() { this.input.tabIndex = this.disabled ? -1 : this.tabIndex; } + + onValueUpdate() { + this.change(this.input.value); + this.$.$applyAsync(); + } } ngModule.vnComponent('vnRange', {