Skip to content

armgit / core

Public Imported from GitHub
0

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

Fix for numbers in or-mwc-input defaulting to 3 decimals. (#1290)

Martin Peetersa641c0640969
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 5ff1b20c7..ad8e8d0ee 100644
--- a/ui/component/or-mwc-components/src/or-mwc-input.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-input.ts
@@ -1345,6 +1345,9 @@ export class OrMwcInput extends LitElement {
format.asDate = true;
format.momentJsFormat = "YYYY-MM-DDTHH:mm";
break;
+ case InputType.NUMBER:
+ format.maximumFractionDigits = 20; // default according to Web documentation
+ break;
}
// Numbers/dates must be in english locale without commas etc.