Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decimal formatting for oh-stepper #2090

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

JustinGeorgi
Copy link
Contributor

@JustinGeorgi JustinGeorgi commented Sep 24, 2023

Fixes #2089.
Possibly regression from #1875.

Stepper formatValue was calculating displayed number of decimals from the value of the step property, not it's length.

Signed-off-by: Justin Georgi [email protected]

@JustinGeorgi JustinGeorgi requested a review from a team as a code owner September 24, 2023 17:10
@florian-h05 florian-h05 added bug Something isn't working main ui Main UI labels Sep 25, 2023
@florian-h05 florian-h05 added this to the 4.1 milestone Sep 25, 2023
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I think this is a regression from #1875.

@florian-h05 florian-h05 merged commit 0cc4f27 into openhab:main Sep 25, 2023
4 checks passed
florian-h05 pushed a commit that referenced this pull request Sep 25, 2023
Fixes #2089.
Possibly regression from #1875.

Stepper formatValue was calculating displayed number of decimals from the value of the step property, not it's length.

Signed-off-by: Justin Georgi <[email protected]>
(cherry picked from commit 0cc4f27)
@florian-h05 florian-h05 added the patch A PR that has been cherry-picked to a patch release branch label Sep 25, 2023
@florian-h05
Copy link
Contributor

@JustinGeorgi FYI I have backported this to 4.0.x, so it will be published with the next patch release.

@JustinGeorgi JustinGeorgi deleted the jag-fix-stepper branch September 26, 2023 04:28
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Oct 4, 2023
Regression from openhab#2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading 'length')` being thrown if the step property is an integer value, e.g. 1 or 1.0.

Signed-off-by: Florian Hotze <[email protected]>
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Oct 4, 2023
Regression from openhab#2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading 'length')` being thrown if the step property is an integer value, e.g. 1 or 1.0.

Signed-off-by: Florian Hotze <[email protected]>
kaikreuzer pushed a commit that referenced this pull request Oct 8, 2023
Regression from #2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading
'length')` being thrown if the step property is an integer value, e.g. 1
or 1.0.

Signed-off-by: Florian Hotze <[email protected]>
florian-h05 added a commit that referenced this pull request Oct 8, 2023
Regression from #2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading
'length')` being thrown if the step property is an integer value, e.g. 1
or 1.0.

Signed-off-by: Florian Hotze <[email protected]>
(cherry picked from commit d4d7bea)
kaikreuzer pushed a commit that referenced this pull request Nov 2, 2023
florian-h05 added a commit that referenced this pull request Nov 2, 2023
…control Item with NaN state (#2137)

Regression from #2090.

Reported on the community, see
https://community.openhab.org/t/openhab-4-1-0-m2-oh-stepper-not-working-properly/150372?u=florian-h05.

---------

Signed-off-by: Florian Hotze <[email protected]>
(cherry picked from commit 060c14e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oh-stepper-item ignoring 2+ decimal places
2 participants