diff --git a/components/form/layouts/card/field.tsx b/components/form/layouts/card/field.tsx index b1e01c6..6eabaf1 100644 --- a/components/form/layouts/card/field.tsx +++ b/components/form/layouts/card/field.tsx @@ -59,7 +59,7 @@ export const Field: React.FC = ({ field, design, focus, ...props }) => { design={design} field={field} urlValue={getUrlDefault()} - focus={false}/* cannot use this in card layout! try with 2 input fields */ + focus={focus} /> diff --git a/components/form/layouts/card/index.tsx b/components/form/layouts/card/index.tsx index 843e90e..76d108f 100644 --- a/components/form/layouts/card/index.tsx +++ b/components/form/layouts/card/index.tsx @@ -147,7 +147,7 @@ export const CardLayout: React.FC = (props) => { onFinish={finish} onValuesChange={updateValues} > - {fields.map((field) => { + {fields.map((field, i) => { if (field.type === 'hidden') { return null } @@ -161,7 +161,7 @@ export const CardLayout: React.FC = (props) => { key={field.id} field={field} design={design} - focus={false} + focus={i === 0} /> ) })} diff --git a/components/form/types/image/index.ts b/components/form/types/image/index.ts index 319507f..1174d48 100644 --- a/components/form/types/image/index.ts +++ b/components/form/types/image/index.ts @@ -1,4 +1,5 @@ /* +TODO import dynamic from 'next/dynamic' import { ComponentType } from 'react' import { AbstractType } from '../abstract.type' @@ -15,3 +16,4 @@ export class ImageType extends AbstractType { } } */ +export {} diff --git a/components/form/types/location/location.input.tsx b/components/form/types/location/location.input.tsx index a278524..77920f3 100644 --- a/components/form/types/location/location.input.tsx +++ b/components/form/types/location/location.input.tsx @@ -13,9 +13,7 @@ export const builder: FieldInputBuilderType = ({ parseValue, }) => function LocationInput ({ field, - design, urlValue, - focus, }) { const [initialZoom, setInitialZoom] = useState(13) const [tiles, setTiles] = useState() diff --git a/components/form/types/radio/radio.input.tsx b/components/form/types/radio/radio.input.tsx index 76f338c..cb65f73 100644 --- a/components/form/types/radio/radio.input.tsx +++ b/components/form/types/radio/radio.input.tsx @@ -14,7 +14,6 @@ export const builder: FieldInputBuilderType = ({ field, design, urlValue, - focus, }) { const { t } = useTranslation() diff --git a/components/form/types/rating/rating.input.tsx b/components/form/types/rating/rating.input.tsx index d657d98..c325e4d 100644 --- a/components/form/types/rating/rating.input.tsx +++ b/components/form/types/rating/rating.input.tsx @@ -11,9 +11,7 @@ export const builder: FieldInputBuilderType = ({ parseValue, }) => function RatingInput ({ field, - design, urlValue, - focus, }) { const { t } = useTranslation() diff --git a/components/form/types/slider/slider.input.tsx b/components/form/types/slider/slider.input.tsx index ea9d0cc..779db87 100644 --- a/components/form/types/slider/slider.input.tsx +++ b/components/form/types/slider/slider.input.tsx @@ -11,7 +11,6 @@ export const builder: FieldInputBuilderType = ({ parseValue, }) => function SliderInput ({ field, - design, urlValue, focus, }) { diff --git a/components/form/types/yes_no/yes_no.input.tsx b/components/form/types/yes_no/yes_no.input.tsx index c28c1a6..d41cdfd 100644 --- a/components/form/types/yes_no/yes_no.input.tsx +++ b/components/form/types/yes_no/yes_no.input.tsx @@ -11,9 +11,7 @@ export const builder: FieldInputBuilderType = ({ parseValue, }) => function YesNoInput ({ field, - design, urlValue, - focus, }) { const { t } = useTranslation()