Skip to content

Commit

Permalink
Merge pull request #479 from NordicSemiconductor/fix/round-ranges-in-…
Browse files Browse the repository at this point in the history
…adv-settings

Fix/round ranges in adv settings
  • Loading branch information
tsvetelinpetrov authored Oct 23, 2024
2 parents 58324ee + 8a62c7f commit f3397d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 4.3.0 - Unreleased

### Fixed

- Floating point ranges in Advanced Configuration are now rounded correctly
when initialized

## 4.2.0 - 2024-07-17

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidePanel/Gains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default () => {
<NumberInput
key={`${index + 1}`}
label={`Range ${index + 1} (${gainTitles[index]})`}
value={gain / 100}
value={Number((gain / 100).toFixed(2))}
range={{ min: 0.9, max: 1.1, decimals: 2 }}
onChange={value => {
dispatch(
Expand Down

0 comments on commit f3397d7

Please sign in to comment.