Decimal umb-property-editor-ui-number fixes#18233
Merged
leekelleher merged 4 commits intov15/devfrom Feb 5, 2025
Merged
Conversation
We don't need to always set the `min` and `max` attributes. Leave the browser to do its thing.
AndyButland
approved these changes
Feb 5, 2025
Contributor
There was a problem hiding this comment.
This looks good to me and I've had a play around and find it works much more as expected now. The only issue I could find is I assume similar to the one you've raised on the UI library:
- Have a value already entered in the input field.
- Select all and type a new value starting with a
.or-- both valid characters for a decimal. - I find I have to type it twice, the first time the character input is discarded.
If you agree that's covered in the other issue, happy to merge this one in and close the one raised in this repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #18150.
Issue #18150 outlines several problems with the Number input when configured for use with the Decimal property-editor.
Changes in this PR:
#parseIntfunction to#parseNumber, it's a private function, renamed for readability.@inputto@changeevent for updating the property value.'') to0, as the empty value may be intentional.max="Infinity", when omitting the attribute is preferred.stepconfiguration for the Decimal data-type configuration, meaning that decimal places can be entered for minimum/maximum configuration.There is one outstanding issue which will need to be resolved in the UUI library, re: umbraco/Umbraco.UI#1004
How to test?
Try configuring a Decimal data-type/property-editor and using it with various decimal/integer values.