dengliming opened a new issue, #638:
URL: https://github.com/apache/shenyu-dashboard/issues/638
## Description
`initDic` writes `this.state[`${type}Dics`] = dics` and `this.state[key] =
true/false`, and `handleImportDiscoveryConfig`/`componentDidMount` write
`this.state.configPropsJson = ...` directly. On the first (uncached) open,
`shenyuDict/fetchByType` puts to the store before the callback runs, so the
re-render happens before the mutation; if that request resolves last, the
operator/paramType/matchMode selects stay empty until an unrelated re-render.
Imported discovery props are not rendered until something else triggers a
render, and submit then serializes `getFieldValue(key)` as `undefined` for each
prop.
## Location
(Lines refer to `master @ 83969a5`.)
- `src/routes/Plugin/Common/Selector.js:127,448-471,996`
- `src/routes/Plugin/Common/Rule.js:115-137`
## Impact
Intermittently empty condition dropdowns on first open; imported discovery
configuration not shown and saved as undefined.
## Suggested fix
Replace the direct assignments with `this.setState({...})`.
## Related existing
None
--
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]