From 781f050885d8dbbb08092834cc37081b1812c79c Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Wed, 17 Apr 2024 20:46:55 +0200 Subject: [PATCH] wip --- .../FindProperty/Public/Autocomplete.tsx | 17 ++++++++++++++--- .../components/FindProperty/Public/index.tsx | 10 +++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/FindProperty/Public/Autocomplete.tsx b/editor.planx.uk/src/@planx/components/FindProperty/Public/Autocomplete.tsx index facc3215db..a9438bb9de 100644 --- a/editor.planx.uk/src/@planx/components/FindProperty/Public/Autocomplete.tsx +++ b/editor.planx.uk/src/@planx/components/FindProperty/Public/Autocomplete.tsx @@ -27,6 +27,7 @@ interface PickOSAddressProps { setShowPostcodeError: React.Dispatch>; initialSelectedAddress?: Option; showAddressSelectError: boolean; + setShowAddressSelectError: React.Dispatch>; id?: string; description?: string; } @@ -186,8 +187,17 @@ export default function PickOSAddress(props: PickOSAddressProps): FCReturn { /> {sanitizedPostcode && ( - - {/* @ts-ignore */ + + { + /* @ts-ignore */ } + /> + } )} diff --git a/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx b/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx index 396cdfe638..25ed4b686b 100644 --- a/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx +++ b/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx @@ -57,10 +57,13 @@ function Component(props: Props) { const [boundary, setBoundary] = useState(); const [showPostcodeError, setShowPostcodeError] = useState(false); - const [showAddressSelectError, setShowAddressSelectError] = useState(false); - const [showDataFetchingError, setShowDataFetchingError] = useState(false); + const [showAddressSelectError, setShowAddressSelectError] = + useState(false); + const [showDataFetchingError, setShowDataFetchingError] = + useState(false); const [showMapError, setShowMapError] = useState(false); - const [showSiteDescriptionError, setShowSiteDescriptionError] = useState(false); + const [showSiteDescriptionError, setShowSiteDescriptionError] = + useState(false); const teamSettings = useStore((state) => state.teamSettings); @@ -174,6 +177,7 @@ function Component(props: Props) { previouslySubmittedData?._address } showAddressSelectError={showAddressSelectError} + setShowAddressSelectError={setShowAddressSelectError} id={props.id} description={props.description || ""} />