| | |
| | | const deviceType = sprite?.data?.type; |
| | | |
| | | const { control, handleSubmit, reset, watch, setValue, formState: { errors } } = useForm({ |
| | | defaultValues: {}, |
| | | defaultValues: { |
| | | // copyDirect: value?.copyDirect || '', |
| | | // copyCount: value?.copyCount || '', |
| | | gap: value?.gap || 0.0, |
| | | }, |
| | | }); |
| | | |
| | | useEffect(() => { |
| | |
| | | <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 item xs={12}> |
| | | <Controller |
| | | name="gap" |
| | | control={control} |
| | | render={({ field }) => ( |
| | | <TextField |
| | | {...field} |
| | | label={translate('page.map.settings.map.copy.field.gap')} |
| | | type="number" |
| | | sx={{ width: '50%' }} |
| | | fullWidth |
| | | onChange={(e) => { |
| | | const value = parseFloat(e.target.value).toFixed(1); |
| | | field.onChange(value); |
| | | }} |
| | | /> |
| | | )} |
| | | /> |
| | | </Grid> |
| | | |
| | | {deviceType === DEVICE_TYPE.SHELF && ( |