@brightspace-ui/core 2.59.2 → 2.59.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -352,27 +352,35 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
|
|
|
352
352
|
updated(changedProperties) {
|
|
353
353
|
super.updated(changedProperties);
|
|
354
354
|
|
|
355
|
+
let checkValidity = false;
|
|
355
356
|
changedProperties.forEach((oldVal, prop) => {
|
|
356
357
|
if (prop === 'value') {
|
|
357
358
|
this.setFormValue(this.value);
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
let rangeOverflowCondition = false;
|
|
365
|
-
if (typeof(this.max) === 'number') {
|
|
366
|
-
rangeOverflowCondition = this.maxExclusive ? this.value >= this.max : this.value > this.max;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
this.setValidity({
|
|
370
|
-
rangeUnderflow: rangeUnderflowCondition,
|
|
371
|
-
rangeOverflow: rangeOverflowCondition
|
|
372
|
-
});
|
|
373
|
-
this.requestValidate(true);
|
|
359
|
+
checkValidity = true;
|
|
360
|
+
} else if ((prop === 'min' && oldVal !== undefined)
|
|
361
|
+
|| (prop === 'max' && oldVal !== undefined)
|
|
362
|
+
|| (prop === 'minExclusive' && oldVal !== undefined)
|
|
363
|
+
|| (prop === 'maxExclusive' && oldVal !== undefined)) {
|
|
364
|
+
checkValidity = true;
|
|
374
365
|
}
|
|
375
366
|
});
|
|
367
|
+
|
|
368
|
+
if (checkValidity) {
|
|
369
|
+
let rangeUnderflowCondition = false;
|
|
370
|
+
if (typeof(this.min) === 'number') {
|
|
371
|
+
rangeUnderflowCondition = this.minExclusive ? this.value <= this.min : this.value < this.min;
|
|
372
|
+
}
|
|
373
|
+
let rangeOverflowCondition = false;
|
|
374
|
+
if (typeof(this.max) === 'number') {
|
|
375
|
+
rangeOverflowCondition = this.maxExclusive ? this.value >= this.max : this.value > this.max;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
this.setValidity({
|
|
379
|
+
rangeUnderflow: rangeUnderflowCondition,
|
|
380
|
+
rangeOverflow: rangeOverflowCondition
|
|
381
|
+
});
|
|
382
|
+
this.requestValidate(true);
|
|
383
|
+
}
|
|
376
384
|
}
|
|
377
385
|
|
|
378
386
|
async validate() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.59.
|
|
3
|
+
"version": "2.59.3",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|