Skip to content

Commit ef4957f

Browse files
committed
fix(#313): slider value label don't sync when set value
1 parent f4af2f2 commit ef4957f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

webiojs/src/models/input/slider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ export class Slider extends InputItem {
6464

6565
update_input(spec: any): any {
6666
let attributes = spec.attributes;
67+
if ('value' in attributes) {
68+
let range_value = this.element.find('.form-control-range-value');
69+
range_value.text(
70+
this.spec['float'] ? this.get_value().toFixed(2) : attributes.value
71+
);
72+
}
6773
this.update_input_helper(-1, attributes);
6874
}
6975

0 commit comments

Comments
 (0)