Added map settings change cache to improve editing performance

This commit is contained in:
Mitchell McCaffrey
2020-06-27 11:18:47 +10:00
parent f301a58c12
commit 67356255b9
3 changed files with 57 additions and 30 deletions

View File

@@ -19,12 +19,9 @@ function SelectMapButton({
currentMapState && updateMapState(currentMapState.mapId, currentMapState);
setIsModalOpen(true);
}
function closeModal() {
setIsModalOpen(false);
}
function handleDone() {
closeModal();
setIsModalOpen(false);
}
return (
@@ -38,7 +35,6 @@ function SelectMapButton({
</IconButton>
<SelectMapModal
isOpen={isModalOpen}
onRequestClose={closeModal}
onDone={handleDone}
onMapChange={onMapChange}
onMapStateChange={onMapStateChange}