@@ -128,36 +128,46 @@ export class SliderWebcomponent extends BaseCustomWebComponentConstructorAppend
128
128
private _rangeInputs : HTMLInputElement [ ] ;
129
129
private _ready : Boolean = false ;
130
130
private _valuesGap : number = 1 ;
131
+ private _suppressAttributeChange : boolean = false ;
131
132
132
133
public get valueMin ( ) {
133
134
return this . getAttribute ( 'value-min' ) ;
134
135
}
135
136
public set valueMin ( value ) {
137
+ this . _suppressAttributeChange = true ;
136
138
this . setAttribute ( 'value-min' , value . toString ( ) ) ;
139
+ this . _suppressAttributeChange = false ;
137
140
}
138
141
139
142
public get valueMax ( ) {
140
143
return this . getAttribute ( 'value-max' ) ;
141
144
}
142
145
public set valueMax ( value ) {
146
+ this . _suppressAttributeChange = true ;
143
147
this . setAttribute ( 'value-max' , value . toString ( ) ) ;
148
+ this . _suppressAttributeChange = false ;
144
149
}
145
150
146
151
public get min ( ) {
147
152
return this . getAttribute ( 'min' ) ;
148
153
}
149
154
public set min ( value ) {
155
+ this . _suppressAttributeChange = true ;
150
156
this . setAttribute ( 'min' , value . toString ( ) ) ;
157
+ this . _suppressAttributeChange = false ;
151
158
}
152
159
153
160
public get max ( ) {
154
161
return this . getAttribute ( 'max' ) ;
155
162
}
156
163
public set max ( value ) {
164
+ this . _suppressAttributeChange = true ;
157
165
this . setAttribute ( 'max' , value . toString ( ) ) ;
166
+ this . _suppressAttributeChange = false ;
158
167
}
159
168
160
169
attributeChangedCallback ( name : string , oldValue : string , newValue : string ) {
170
+ if ( this . _suppressAttributeChange ) return ;
161
171
if ( name == "value-min" ) {
162
172
this . _valueMinAttributeChanged ( ) ;
163
173
}
@@ -230,7 +240,6 @@ export class SliderWebcomponent extends BaseCustomWebComponentConstructorAppend
230
240
} ) ;
231
241
}
232
242
233
-
234
243
this . _ready = true ;
235
244
236
245
this . _updateInputValues ( ) ;
@@ -294,6 +303,8 @@ export class SliderWebcomponent extends BaseCustomWebComponentConstructorAppend
294
303
this . _updateSliderPosition ( maxp , value2 , false ) ;
295
304
}
296
305
}
306
+ this . valueMin = this . _rangeInputs [ 0 ] . value ;
307
+ this . valueMax = this . _rangeInputs [ 1 ] . value ;
297
308
}
298
309
299
310
private _updateSliderPosition ( value : number , max : number , isMin : boolean ) {
0 commit comments