e2corporation commented on code in PR #3191:
URL: https://github.com/apache/incubator-devlake/pull/3191#discussion_r984094602
##########
config-ui/src/components/blueprints/transformations/CICD/Deployment.jsx:
##########
@@ -40,17 +40,25 @@ const Deployment = (props) => {
useEffect(() => {
setSelectValue(
transformation?.deploymentPattern ||
- transformation?.deploymentPattern === ''
+ transformation?.deploymentPattern === '' ||
+ transformation?.productionPattern ||
+ transformation?.productionPattern === ''
? 1
: 0
)
- }, [transformation?.deploymentPattern])
+ }, [transformation?.deploymentPattern, transformation?.productionPattern])
const handleChangeSelectValue = (sv) => {
if (entityIdKey && sv === 0) {
- onSettingsChange({ deploymentPattern: undefined }, entityIdKey)
+ onSettingsChange(
+ { deploymentPattern: undefined, productionPattern: undefined },
Review Comment:
@mintsweet @likyh This effect will definitely need to be removed, adding the
dependency here creates a circular loop resulting in a maximum nesting level
error. This is why it's always extremely important to run lint locally and fix
the react-hooks/exhaustive-deps warnings.
<img width="1355" alt="Screen Shot 2022-09-29 at 7 26 02 PM"
src="https://user-images.githubusercontent.com/1742233/193159592-bc0bdc6a-6883-433e-a628-214dcd30365c.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]