-
Notifications
You must be signed in to change notification settings - Fork 549
Conversation
…r image custmoized Toggle empty the commands
@@ -187,14 +187,14 @@ export const DockerSection = ({onValueChange, value}) => { | |||
if (optionKey !== 'customize-image' && isCutomizedImageEnabled) { | |||
setCutomizedImageEnabled(false); | |||
} | |||
}, []); | |||
}, [uri]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the isCustomizedImageEnabled
state should be determined by uri
prop.
You can use a useMemo
hook to store the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isCustomizedImageEnabled
is not just depends on the uri
pop. Customers can also change its' value. So this situation could happens: uri
not changed but isCustomizedImageEnabled
is changed by customer.
Maybe use state is better for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEffect
will be triggered each time page is rerendered. So if user input an existing docker option in the custom docker url text field like ufoym/deepo:tensorflow-py36-cu100
, this hook will be triggered and isCutomizedImageEnabled
will be set to false
.
By the way, the |
Thanks for this, notice that |
* fix bug: submit button is disabled after import validate yaml & docker image custmoized Toggle empty the commands * minor update * address comments
No description provided.