diff --git a/ui/src/app/dashboard/view/SourcesTab.js b/ui/src/app/dashboard/view/SourcesTab.js index 40ff4dd4f..b0d1352d3 100644 --- a/ui/src/app/dashboard/view/SourcesTab.js +++ b/ui/src/app/dashboard/view/SourcesTab.js @@ -37,7 +37,7 @@ export function SourcesTab () { React.useEffect(() => { loadSources() }, []); async function changeSourceGroup(source, group) { - await updater.put(`/${source.id}`, { + await updater.put(`/${source.id}/changeGroup/${group}`, { ...source, idOfOwner: group }); diff --git a/ui/src/app/metadata/copy/CopySource.js b/ui/src/app/metadata/copy/CopySource.js index f3ae6b142..d7d0be54a 100644 --- a/ui/src/app/metadata/copy/CopySource.js +++ b/ui/src/app/metadata/copy/CopySource.js @@ -34,7 +34,7 @@ export function CopySource({ copy, onNext }) { setSelected([]); }; - const { register, handleSubmit, control, formState, setValue, getValues } = useForm({ + const { register, handleSubmit, control, formState, setValue, getValues, watch } = useForm({ mode: 'onChange', reValidateMode: 'onBlur', defaultValues: { @@ -47,6 +47,8 @@ export function CopySource({ copy, onNext }) { shouldUnregister: false, }); + const target = watch('target'); + const { errors, isValid } = formState; React.useEffect(() => { @@ -92,25 +94,28 @@ export function CopySource({ copy, onNext }) {