diff --git a/scm-ui/ui-components/src/forms/Select.tsx b/scm-ui/ui-components/src/forms/Select.tsx index bc216219c0..783a8d69cb 100644 --- a/scm-ui/ui-components/src/forms/Select.tsx +++ b/scm-ui/ui-components/src/forms/Select.tsx @@ -95,7 +95,7 @@ const InnerSelect: FC> = ({ if (!value && field.current?.value) { if (props.onChange) { if (isUsingRef(props)) { - const event = new Event("change"); + const event: Event = new CustomEvent("change", { bubbles: true, detail: { target: field } }); field.current?.dispatchEvent(event); } else if (isLegacy(props)) { props.onChange(field.current?.value, name); diff --git a/scm-ui/ui-webapp/src/repos/branches/components/BranchForm.tsx b/scm-ui/ui-webapp/src/repos/branches/components/BranchForm.tsx index 59976867e7..c62a3e8985 100644 --- a/scm-ui/ui-webapp/src/repos/branches/components/BranchForm.tsx +++ b/scm-ui/ui-webapp/src/repos/branches/components/BranchForm.tsx @@ -28,7 +28,7 @@ type Props = { disabled?: boolean; }; -const autoFocus = (el) => el?.focus(); +const autoFocus = (el: HTMLSelectElement) => el?.focus(); const BranchForm: FC = ({ submitForm, branches, disabled, transmittedName, loading }) => { const [t] = useTranslation("repos");