From 20e5fc4faf07e6bf53b9200d4525f88bb39e414f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Velarde?= Date: Fri, 27 Nov 2020 17:28:50 +0100 Subject: [PATCH] Fix bar size in CategoryWidget --- CHANGELOG.md | 2 ++ src/ui/widgets/CategoryWidgetUI.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 635f7d3a9..5e1d1c067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - Make OAuthLogin component responsive [#28](https://github.com/CartoDB/carto-react-lib/pull/28) - Remove FilterTypes from API exports [#29](https://github.com/CartoDB/carto-react-lib/pull/29) - Fix CategoryWidgetUI keeping the order for blocked categories [#32](https://github.com/CartoDB/carto-react-lib/pull/32) +- Fix bar size in CategoryWidget [#33](https://github.com/CartoDB/carto-react-lib/pull/33) + ## 1.0.0-beta5 (2020-11-25) - Fix addSource keeping optional credentials property in the payload [#24](https://github.com/CartoDB/carto-react-lib/pull/24) diff --git a/src/ui/widgets/CategoryWidgetUI.js b/src/ui/widgets/CategoryWidgetUI.js index 448676bfa..bbd39b480 100644 --- a/src/ui/widgets/CategoryWidgetUI.js +++ b/src/ui/widgets/CategoryWidgetUI.js @@ -275,7 +275,7 @@ function CategoryWidgetUI(props) { ? value != null ? '100%' : 0 - : `${(value || 0 * 100) / maxValue}%`; + : `${((value || 0) * 100) / maxValue}%`; }, [maxValue] );