Fix checkbox control / uncontrol

This commit is contained in:
Mitchell McCaffrey 2020-07-01 08:43:34 +10:00
parent 7c428862f8
commit f1ddaa20ab

View File

@ -91,7 +91,7 @@ function MapSettings({
</Box>
<Label sx={{ width: "50%" }} ml={2}>
<Checkbox
checked={map && map.showGrid}
checked={!mapEmpty && map.showGrid}
disabled={mapEmpty || map.type === "default"}
onChange={(e) => onSettingsChange("showGrid", e.target.checked)}
/>