diff --git a/src/components/edit/event/EventDialog.jsx b/src/components/edit/event/EventDialog.jsx index 5296b41ee..d521b846d 100644 --- a/src/components/edit/event/EventDialog.jsx +++ b/src/components/edit/event/EventDialog.jsx @@ -146,7 +146,7 @@ class EventDialog extends Component { } // Set default dates - if (!backupPeriodsDates) { + if (!hasDate && !backupPeriodsDates) { const defaultDates = getDefaultDatesInCalendar() setStartDate(defaultDates.startDate) setEndDate(defaultDates.endDate) diff --git a/src/components/edit/thematic/ThematicDialog.jsx b/src/components/edit/thematic/ThematicDialog.jsx index 0043c53e3..cb759bdc8 100644 --- a/src/components/edit/thematic/ThematicDialog.jsx +++ b/src/components/edit/thematic/ThematicDialog.jsx @@ -119,6 +119,7 @@ const ThematicDialog = ({ orgUnits, systemSettings, syncFromOtherLayers, + shouldSyncFromOtherLayers, }) ) // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/src/components/edit/thematic/initializeThematicLayer.js b/src/components/edit/thematic/initializeThematicLayer.js index f973c65ee..cfea39c73 100644 --- a/src/components/edit/thematic/initializeThematicLayer.js +++ b/src/components/edit/thematic/initializeThematicLayer.js @@ -67,6 +67,7 @@ const initializePeriods = ( defaultRenderingStrategy, systemSettings, syncFromOtherLayers, + shouldSyncFromOtherLayers, } ) => { if (filters || (startDate !== undefined && endDate !== undefined)) { @@ -76,6 +77,7 @@ const initializePeriods = ( const defaultPeriods = getDefaultPeriods(systemSettings) if ( + shouldSyncFromOtherLayers && syncFromOtherLayers({ renderingStrategy: renderingStrategy || defaultRenderingStrategy, })