From 77f2b2fe8ffd98528f19f1ef88d4eeb346c63d4a Mon Sep 17 00:00:00 2001 From: Liu Xin Date: Mon, 18 Sep 2023 15:34:49 +0800 Subject: [PATCH] fix: fix the harbor not search in edit (#1814) Signed-off-by: harrisonliu5 --- .../ContainerSetting/ImageInput/DropdownContent.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Forms/Workload/ContainerSettings/ContainerForm/ContainerSetting/ImageInput/DropdownContent.jsx b/src/components/Forms/Workload/ContainerSettings/ContainerForm/ContainerSetting/ImageInput/DropdownContent.jsx index 625571612da..2331d9e585d 100644 --- a/src/components/Forms/Workload/ContainerSettings/ContainerForm/ContainerSetting/ImageInput/DropdownContent.jsx +++ b/src/components/Forms/Workload/ContainerSettings/ContainerForm/ContainerSetting/ImageInput/DropdownContent.jsx @@ -35,10 +35,9 @@ export default class DropdownContent extends React.Component { constructor(props) { super(props) const { imageRegistries } = this.props - const harborData = this.hubType === 'harbor' - ? imageRegistries.find(item => item === this.secretValue) + ? imageRegistries.find(item => item.value === this.secretValue) : {} this.state = { @@ -264,6 +263,7 @@ export default class DropdownContent extends React.Component { fetchHarborList = async (keyword, harborData) => { const url = get(harborData, 'url') + if (!url || isEmpty(harborData)) return this.setState({ isLoading: true })