| | |
| | | |
| | | const { control, handleSubmit, reset, watch, setValue, formState: { errors } } = useForm({ |
| | | defaultValues: { |
| | | copyDirect: value?.copyDirect || '', |
| | | copyCount: value?.copyCount || '', |
| | | // copyDirect: value?.copyDirect || '', |
| | | // copyCount: value?.copyCount || '', |
| | | gap: value?.gap || 0.0, |
| | | }, |
| | | }); |
| | | |
| | | useEffect(() => { |
| | | if (value && Object.keys(value).length > 0) { |
| | | setValue('copyDirect', value.copyDirect); |
| | | setValue('copyCount', value.copyCount); |
| | | } |
| | | }, [value, setValue]) |
| | | |
| | |
| | | <Grid container spacing={1.4}> |
| | | |
| | | <Grid item xs={6}> |
| | | <Typography variant="body1"> |
| | | {translate('page.map.settings.map.copy.direction')}: {value?.copyDirect} |
| | | </Typography> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <Typography variant="body1"> |
| | | {translate('page.map.settings.map.copy.count')}: {value?.copyCount} |
| | | </Typography> |
| | | </Grid> |
| | | |
| | | {/* <Grid item xs={6}> |
| | | <Controller |
| | | name="copyDirect" |
| | | control={control} |
| | |
| | | )} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6}> |
| | | <Controller |
| | | name="copyCount" |
| | |
| | | /> |
| | | )} |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | |
| | | <Grid item xs={12}> |
| | | <Controller |