From cd7bbfe60c8ff426a4f9ec3955f50f23751edeff Mon Sep 17 00:00:00 2001 From: Manuel Rodriguez Date: Wed, 22 May 2024 18:31:04 -0700 Subject: [PATCH] Fixed lease warning not showing --- .../propertyPicker/LeasePropertySelector.tsx | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx b/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx index 9faefba6b9..5965deb390 100644 --- a/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx +++ b/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx @@ -15,7 +15,7 @@ import { useProperties } from '@/hooks/repositories/useProperties'; import useDeepCompareEffect from '@/hooks/util/useDeepCompareEffect'; import useDeepCompareMemo from '@/hooks/util/useDeepCompareMemo'; import { ApiGen_Concepts_PropertyView } from '@/models/api/generated/ApiGen_Concepts_PropertyView'; -import { isValidId } from '@/utils'; +import { exists, isValidId, isValidString } from '@/utils'; import { FormLeaseProperty, LeaseFormModel } from '../../models'; import SelectedPropertyHeaderRow from './selectedPropertyList/SelectedPropertyHeaderRow'; @@ -113,28 +113,25 @@ export const LeasePropertySelector: React.FunctionComponent 0) { - formProperty.property!.apiId = result[0].id; + formProperty.property.apiId = result[0].id; } } } newFormProperties.push(formProperty); - - if (isValidId(formProperty.property?.apiId)) { - needsWarning = needsWarning || true; - } else { - needsWarning = needsWarning || false; - } }); }, Promise.resolve());