Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI fix for maximumFractionDigits being forced to 20 (#1742)

Dennis Kuijs1a6dbc4bc9e2
diff --git a/ui/component/or-mwc-components/src/or-mwc-input.ts b/ui/component/or-mwc-components/src/or-mwc-input.ts
index 776ff6282..c6f56623a 100644
--- a/ui/component/or-mwc-components/src/or-mwc-input.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-input.ts
@@ -1358,7 +1358,7 @@ export class OrMwcInput extends LitElement {
format.momentJsFormat = "YYYY-MM-DDTHH:mm";
break;
case InputType.NUMBER:
- format.maximumFractionDigits = 20; // default according to Web documentation
+ format.maximumFractionDigits ??= 20; // default according to Web documentation
break;
}