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) v34 #1210

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

martinkrulltott
Copy link
Contributor

@martinkrulltott martinkrulltott commented Aug 21, 2020

Backport of #1161 for v34

Had to change ui to ui-core, since v34 is using an older version of this library.

  • 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
Member

@edoardo edoardo left a comment

Choose a reason for hiding this comment

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

LGTM

@martinkrulltott martinkrulltott merged commit b099607 into 34.x Aug 25, 2020
@martinkrulltott martinkrulltott deleted the fix/DHIS2-9002-positive-numbers-v34 branch August 25, 2020 07:55
dhis2-bot added a commit that referenced this pull request Aug 25, 2020
## [34.6.14](v34.6.13...v34.6.14) (2020-08-25)

### Bug Fixes

* change help text for aggregation type ([#1151](#1151)) ([#1209](#1209)) ([b9c3519](b9c3519))
* Decimals and Steps options only allow positive values (DHIS2-9002, DHIS2-9194) ([#1161](#1161)) v34 ([#1210](#1210)) ([b099607](b099607))
* reorder options for consistency (DHIS2-9004) (519b0ba) v34 ([#1211](#1211)) ([8c59852](8c59852))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 34.6.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