From 8bc931aa5fc14201f5394f63acb1a5220c8758c6 Mon Sep 17 00:00:00 2001 From: Almaz Date: Thu, 26 Sep 2024 21:46:11 +0300 Subject: [PATCH] Fix tags deleting of hidden side form (#163) --- src/parking/controls/editor/EditorForm.tsx | 15 ++++++++++++--- src/parking/controls/editor/SideGroup.tsx | 4 +++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/parking/controls/editor/EditorForm.tsx b/src/parking/controls/editor/EditorForm.tsx index 7615654..ae891a5 100644 --- a/src/parking/controls/editor/EditorForm.tsx +++ b/src/parking/controls/editor/EditorForm.tsx @@ -51,9 +51,18 @@ export function LaneEditForm(props: {
- {bothBlockShown ? : null} - {!bothBlockShown ? : null} - {!bothBlockShown ? : null} + + +
diff --git a/src/parking/controls/editor/SideGroup.tsx b/src/parking/controls/editor/SideGroup.tsx index dfe5529..599b8c8 100644 --- a/src/parking/controls/editor/SideGroup.tsx +++ b/src/parking/controls/editor/SideGroup.tsx @@ -9,11 +9,13 @@ import { parkingLaneTags } from './lane-tags' export function SideGroup(props: { osm: OsmWay side: 'both' | 'left' | 'right' + shown: boolean onChange: (e: React.SyntheticEvent, way: OsmWay) => void }) { return (
+ className={`tags-block tags-block_${props.side}`} + style={{ display: props.shown ? undefined : 'none' }} >