Skip to content

Commit

Permalink
Fix BarWidgetUI lack of update when modifying its props (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVelarde authored Jan 4, 2023
1 parent 173e977 commit 9676c9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Not released

- Allow to use custom version explictly in GoogleMap (not 'beta' by default now) [#550](https://github.com/CartoDB/carto-react/pull/550)
- Fix lack of refresh in BarWidgetUI when modyfing yAxisData dinamically [#558](https://github.com/CartoDB/carto-react/pull/558)

## 1.5

Expand Down
4 changes: 2 additions & 2 deletions packages/react-basemaps/src/basemaps/GoogleMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { debounce } from '@carto/react-core';
* @param { function } props.onViewStateChange - (Optional) onViewStateChange handler
* @param { string } props.apiKey - Google Maps API Key
* @param { string } props.mapId - Google Maps custom mapId
* @param { string } props.customVersion - (Optional) Google Maps custom version, that will be specified at url level. Eg: if customVersion === 'beta' it will use internally like https://maps.google.com/maps/api/js?v=beta
* @param { string } props.customVersion - (Optional) Google Maps custom version, that will be specified at url level. Eg: if customVersion === 'beta' it will use internally this: https://maps.google.com/maps/api/js?v=beta
* @returns { JSX.Element } - Data returned from the SQL query execution
*/
export function GoogleMap(props) {
Expand All @@ -28,7 +28,7 @@ export function GoogleMap(props) {
onViewStateChange,
apiKey,
mapId,
customVersion = null
customVersion = ''
} = props;
// based on https://publiuslogic.com/blog/google-maps+react-hooks/
const containerRef = useRef();
Expand Down
1 change: 1 addition & 0 deletions packages/react-ui/src/widgets/BarWidgetUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ function BarWidgetUI(props) {
<ReactEcharts
option={options}
lazyUpdate={true}
notMerge={true}
onEvents={onEvents}
style={{ height }}
/>
Expand Down

0 comments on commit 9676c9e

Please sign in to comment.