Fix no initial source branch set

Changelog is omitted, because the bug was never released

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
Thomas Zerr
2025-01-09 15:29:30 +01:00
parent 08e57b9a19
commit 51449b6b2c
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ const InnerSelect: FC<FieldProps<BaseProps, HTMLSelectElement, string>> = ({
if (!value && field.current?.value) {
if (props.onChange) {
if (isUsingRef<BaseProps, HTMLSelectElement, string>(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);

View File

@@ -28,7 +28,7 @@ type Props = {
disabled?: boolean;
};
const autoFocus = (el) => el?.focus();
const autoFocus = (el: HTMLSelectElement) => el?.focus();
const BranchForm: FC<Props> = ({ submitForm, branches, disabled, transmittedName, loading }) => {
const [t] = useTranslation("repos");