mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 09:45:50 +00:00
fix lint, and readd focus passing
This commit is contained in:
parent
4c8ca21fd2
commit
1b87f9352c
@ -59,7 +59,7 @@ export const Field: React.FC<Props> = ({ 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}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -147,7 +147,7 @@ export const CardLayout: React.FC<LayoutProps> = (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<LayoutProps> = (props) => {
|
||||
key={field.id}
|
||||
field={field}
|
||||
design={design}
|
||||
focus={false}
|
||||
focus={i === 0}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
|
||||
@ -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<string> {
|
||||
}
|
||||
}
|
||||
*/
|
||||
export {}
|
||||
|
||||
@ -13,9 +13,7 @@ export const builder: FieldInputBuilderType = ({
|
||||
parseValue,
|
||||
}) => function LocationInput ({
|
||||
field,
|
||||
design,
|
||||
urlValue,
|
||||
focus,
|
||||
}) {
|
||||
const [initialZoom, setInitialZoom] = useState<number>(13)
|
||||
const [tiles, setTiles] = useState<string>()
|
||||
|
||||
@ -14,7 +14,6 @@ export const builder: FieldInputBuilderType = ({
|
||||
field,
|
||||
design,
|
||||
urlValue,
|
||||
focus,
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
||||
@ -11,9 +11,7 @@ export const builder: FieldInputBuilderType = ({
|
||||
parseValue,
|
||||
}) => function RatingInput ({
|
||||
field,
|
||||
design,
|
||||
urlValue,
|
||||
focus,
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ export const builder: FieldInputBuilderType = ({
|
||||
parseValue,
|
||||
}) => function SliderInput ({
|
||||
field,
|
||||
design,
|
||||
urlValue,
|
||||
focus,
|
||||
}) {
|
||||
|
||||
@ -11,9 +11,7 @@ export const builder: FieldInputBuilderType = ({
|
||||
parseValue,
|
||||
}) => function YesNoInput ({
|
||||
field,
|
||||
design,
|
||||
urlValue,
|
||||
focus,
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user