Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

rerender dialog component every time there is a change to the contents #2477

Benjamin King9c6263ff7e21
diff --git a/web/js/containers/map-interactions.js b/web/js/containers/map-interactions.js
index 7a531b03b..847dc8071 100644
--- a/web/js/containers/map-interactions.js
+++ b/web/js/containers/map-interactions.js
@@ -93,6 +93,7 @@ const mapDispatchToProps = dispatch => ({
dispatch(onClose());
},
openVectorDiaglog: (dialogId, metaArray, offsetLeft, offsetTop, isMobile) => {
+ const dialogKey = new Date().getUTCMilliseconds();
dispatch(openCustomContent(dialogId,
{
backdrop: false,
@@ -104,7 +105,8 @@ const mapDispatchToProps = dispatch => ({
CompletelyCustomModal: vectorDialog,
isResizable: true,
dragHandle: '.modal-header',
- dialogKey: new Date().getUTCMilliseconds(),
+ dialogKey,
+ key: dialogKey,
vectorMetaObject: lodashGroupBy(metaArray, 'id'),
width: isMobile ? 250 : 445,
height: 300,
@@ -150,7 +152,8 @@ MapInteractions.propTypes = {
selectVectorFeatures: PropTypes.func.isRequired,
compareState: PropTypes.object,
isMobile: PropTypes.bool,
- lastSelected: PropTypes.object
+ lastSelected: PropTypes.object,
+ swipeOffset: PropTypes.number
};
export default connect(
mapStateToProps,