Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(instance-detail): 修复如果是异步渲染组件报TypeError: Cannot read properties o… #704

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions libs/cmdb-instances/src/instance-detail/InstanceDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ export class LegacyInstanceDetail extends React.Component<
const _modelData = modifyModelData(filterModelData);
const hideModelData = _modelData.view.hide_columns || [];

this.setState({
const _state = {
modelDataMap,
modelData: {
..._modelData,
Expand All @@ -1366,8 +1366,9 @@ export class LegacyInstanceDetail extends React.Component<
basicInfoGroupListShow: [],
basicInfoGroupList: [],
externalSourceId,
});
this.setBasicInfoGroupList(this.state);
} as LegacyInstanceDetailState;
this.setState({ ..._state });
this.setBasicInfoGroupList(_state);
// this.setFormattedInstanceData(this.state);
} catch (e) {
// 统一处理请求错误
Expand Down
Loading