diff --git a/packages/app/src/components/ResourceFinder/index.tsx b/packages/app/src/components/ResourceFinder/index.tsx index 341fcba..fb76542 100644 --- a/packages/app/src/components/ResourceFinder/index.tsx +++ b/packages/app/src/components/ResourceFinder/index.tsx @@ -12,7 +12,7 @@ import { type InputSelectProps } from '@commercelayer/app-elements/dist/ui/forms/InputSelect' -interface Props { +interface Props extends Pick { /** * Text to show above the input */ @@ -33,10 +33,6 @@ interface Props { * callback function fired when the resource is selected from the list */ onSelect?: (resourceId: string | null) => void - /** - * Validation feedback - */ - feedback?: InputSelectProps['feedback'] } export function ResourceFinder({ @@ -45,6 +41,7 @@ export function ResourceFinder({ resourceType, sdkClient, feedback, + hint, onSelect }: Props): JSX.Element { const [isLoading, setIsLoading] = useState(true) @@ -85,6 +82,7 @@ export function ResourceFinder({ initialValues={initialValues} isClearable feedback={feedback} + hint={hint} placeholder={placeholder} isLoading={isLoading} onSelect={(selected) => { diff --git a/packages/app/src/pages/NewImportPage.tsx b/packages/app/src/pages/NewImportPage.tsx index e07b978..059fbd0 100644 --- a/packages/app/src/pages/NewImportPage.tsx +++ b/packages/app/src/pages/NewImportPage.tsx @@ -36,7 +36,6 @@ function NewImportPage(): JSX.Element { ) const [_location, setLocation] = useLocation() - const [isTouched, setIsTouched] = useState(false) const [isLoading, setIsLoading] = useState(false) const [apiError, setApiError] = useState() const [parentResourceId, setParentResourceId] = useState() @@ -128,9 +127,7 @@ function NewImportPage(): JSX.Element { const parentResource = getParentResourceIfNeeded(resourceType) const canCreateImport = - importCreateValue != null && - importCreateValue.length > 0 && - (parentResourceId != null || parentResource === false) + importCreateValue != null && importCreateValue.length > 0 return ( )} @@ -215,7 +207,6 @@ function NewImportPage(): JSX.Element {