@oliasoft-open-source/react-ui-library 4.15.9 → 4.15.10-beta-1
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.
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70332,6 +70332,10 @@ const initializeContext = (context2) => {
|
|
|
70332
70332
|
UnitContext = context2;
|
|
70333
70333
|
}
|
|
70334
70334
|
};
|
|
70335
|
+
const safeRoundNumbers = (value) => {
|
|
70336
|
+
const isScientific = isScientificStringNum(value);
|
|
70337
|
+
return !isScientific ? roundByMagnitude(value) : value;
|
|
70338
|
+
};
|
|
70335
70339
|
const predefinedMenuActive = "_predefinedMenuActive_ye9w9_1";
|
|
70336
70340
|
const inputWrapper = "_inputWrapper_ye9w9_4";
|
|
70337
70341
|
const styles = {
|
|
@@ -70640,7 +70644,7 @@ const UnitInput = ({
|
|
|
70640
70644
|
sections: alternativeUnits.map(([value2, altUnit, label2]) => {
|
|
70641
70645
|
const displayUnit = label2 || altUnit || "";
|
|
70642
70646
|
const safeValue = isValidNum(value2) ? value2 : "";
|
|
70643
|
-
const displayValue = enableCosmeticRounding ?
|
|
70647
|
+
const displayValue = enableCosmeticRounding ? safeRoundNumbers(safeValue) : safeValue;
|
|
70644
70648
|
return {
|
|
70645
70649
|
type: "Option",
|
|
70646
70650
|
label: displayValue,
|