diff --git a/src/main/webui/src/app/components/content/common/PackageTypeSelect.jsx b/src/main/webui/src/app/components/content/common/PackageTypeSelect.jsx index 21f023c..d572cff 100644 --- a/src/main/webui/src/app/components/content/common/PackageTypeSelect.jsx +++ b/src/main/webui/src/app/components/content/common/PackageTypeSelect.jsx @@ -21,7 +21,7 @@ import {Utils} from '#utils/AppUtils'; const {statsRes} = IndyRest; -export const PackageTypeSelect = ({register, formErrors}) =>{ +export const PackageTypeSelect = ({register, formErrors, updatePackageType}) =>{ const [state, setState] = useState({ pkgTypes: [] }); @@ -43,9 +43,22 @@ export const PackageTypeSelect = ({register, formErrors}) =>{ if(register){ registered = register("packageType", {required: true}); } + + const {onChange, onBlur, name, ref} = registered; + + const change = e => { + setSelected(e.target.value); + if (typeof updatePackageType === "function") { + updatePackageType(e.target.value); + } + if (typeof onChange === "function") { + onChange(e); + } + }; + return