Skip to content

Commit

Permalink
ad mask to detector form
Browse files Browse the repository at this point in the history
  • Loading branch information
tizayi committed Aug 19, 2024
1 parent 79f9c41 commit 099ae22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dialogs/detectorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function DetectorDialog(props: {
}): JSX.Element {
const detectorStore = useDetectorStore();
const { register,
reset, handleSubmit, control} = useForm<DetectorForm>();
reset, handleSubmit, control, getValues} = useForm<DetectorForm>();
const onSubmit: SubmitHandler<DetectorForm> = (data: DetectorForm) => {
detectorStore.addNewDetector(
data.name,
Expand Down Expand Up @@ -185,7 +185,9 @@ export default function DetectorDialog(props: {
<Autocomplete
{...props}
multiple
options={[...Array(10).keys()]}
options={[...Array(
getValues().detector.mask?.horizontalGap??5
).keys()]}
getOptionLabel={(option:number) => `${option}`}
defaultValue={[]}
filterSelectedOptions
Expand Down

0 comments on commit 099ae22

Please sign in to comment.