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) v32 #1255

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

martinkrulltott
Copy link
Contributor

Backport of #1161 for v33

Clean cherry-pick of 972a175

  • 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 6574e1e into 32.x Sep 9, 2020
@martinkrulltott martinkrulltott deleted the fix/DHIS2-9002-positive-numbers-v32 branch September 9, 2020 13:56
dhis2-bot added a commit that referenced this pull request Sep 9, 2020
## [32.1.7](v32.1.6...v32.1.7) (2020-09-09)

### Bug Fixes

* Decimals and Steps options only allow positive values (DHIS2-9002, DHIS2-9194) v32 ([#1255](#1255)) ([6574e1e](6574e1e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants