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: Decimals and Steps options only allow positive values (DHIS2-9002, DHIS2-9194) (#1161) v33 #1254

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

martinkrulltott
Copy link
Contributor

Backport of #1161 for v33

Based on cherry-picking b099607

Not a clean CP, had to change quite a lot to adapt it to v33, since it uses MUI instead of ui/ui-core.


image

image


Original description:

  • New base type PositiveNumberBaseType added that only allows positive whole numbers
  • Math.round prevents decimal numbers and returns Number instead of String, which fixes DHIS2-9194
  • parseInt(value, 10) to allow for clearing the value with backspace
  • Applies to both typing manually and by using the browser's built-in "stepper arrows".
  • New help text for Steps, as per Slack discussion, Number of axis tick steps, including the min and max. A value of 2 or lower will be ignored.

Copy link
Collaborator

@janhenrikoverland janhenrikoverland left a comment

Choose a reason for hiding this comment

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

LG

@martinkrulltott martinkrulltott merged commit 8b51823 into 33.x Sep 9, 2020
@martinkrulltott martinkrulltott deleted the fix/DHIS2-9002-positive-numbers-v33 branch September 9, 2020 13:56
dhis2-bot added a commit that referenced this pull request Sep 9, 2020
## [33.1.14](v33.1.13...v33.1.14) (2020-09-09)

### Bug Fixes

* Decimals and Steps options only allow positive values (DHIS2-9002, DHIS2-9194) v33 ([#1254](#1254)) ([8b51823](8b51823))
* pass number value as number ([#1212](#1212)) ([6dce3f4](6dce3f4))
* **translations:** sync translations from transifex (33.x) ([c0d01b2](c0d01b2))
* **translations:** sync translations from transifex (33.x) ([5defa60](5defa60))
* **translations:** sync translations from transifex (33.x) ([97752c9](97752c9))
* **translations:** sync translations from transifex (33.x) ([e5a32bd](e5a32bd))
* **translations:** sync translations from transifex (33.x) ([4769917](4769917))
* **translations:** sync translations from transifex (33.x) ([a8108c2](a8108c2))
* upgrade dhis2 dependencies for translations [v33] [DHIS2-8638] ([#1062](#1062)) ([96b9452](96b9452))
* **translations:** sync translations from transifex (v33) ([648627f](648627f))
* **translations:** sync translations from transifex (v33) ([60b1584](60b1584))
* **translations:** sync translations from transifex (v33) ([d1af8be](d1af8be))
* transifex sync ([#987](#987)) ([28f3f15](28f3f15))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 33.1.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants