You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually in JS, we can get the real values via sap.ui.define / .require. We can't require and assign enums declaratively in XML or JSON.
There is currently no way to discover the actual enum values without inspecting the source code since only keys are visible in API reference.
To make things worse; since the plain object that holds the roundingMode property is typically not derived from ManagedObject (e.g. the formatOptions object), there is no type validation either, unlike in #2166.
The text was updated successfully, but these errors were encountered:
Hello @boghyon ,
Thank you for sharing this finding. I've created an internal incident 1870335948. The status of the issue will be updated here in GitHub.
Regards,
Gergana
we finally made a fix and it's merged to the master branch a moment ago. We decided not to downport the fix. If you need this fix in the released branch as well, please reopen the ticket with the version info. We will then consider downporting the change.
Currently, the
RoundingMode
key-value pairs are not identical to each other.openui5/src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js
Lines 108 to 152 in 7bfdad7
Why is this a problem?
Besides the doc saying to do so; when assigning enum values declaratively e.g. in XML or
manifest.json
, the actual values must be passed ("floor"
) instead of key names ("FLOOR"
).sap.ui.define
/.require
. We can't require and assign enums declaratively in XML or JSON.To make things worse; since the plain object that holds the
roundingMode
property is typically not derived fromManagedObject
(e.g. theformatOptions
object), there is no type validation either, unlike in #2166.The text was updated successfully, but these errors were encountered: