Skip to content

Commit

Permalink
Fix: miss the form items after turning off the switch (#611)
Browse files Browse the repository at this point in the history
Signed-off-by: barnettZQG <[email protected]>
(cherry picked from commit 9d1af0b)

Co-authored-by: barnettZQG <[email protected]>
  • Loading branch information
github-actions[bot] and barnettZQG authored Aug 24, 2022
1 parent 430a9c3 commit 7d64df9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/components/UISchema/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,6 @@ class UISchema extends Component<Props, State> {
if (!uiSchema || enableCodeEdit) {
return this.renderCodeEdit();
}
if (mode == 'edit' && value === undefined) {
return <div />;
}
let onlyShowRequired = false;
let couldShowParamCount = 0;
uiSchema.map((param) => {
Expand Down Expand Up @@ -359,7 +356,7 @@ class UISchema extends Component<Props, State> {
if (initValue === undefined) {
initValue = param.validate?.defaultValue;
}
const disableEdit = (param.validate?.immutable && this.props.mode == 'edit') || false;
const disableEdit = (param.validate?.immutable && mode == 'edit') || false;
const getGroup = (children: React.ReactNode) => {
return (
<Group
Expand Down
4 changes: 2 additions & 2 deletions src/extends/Group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class Group extends React.Component<Props, State> {
type: 'confirm',
content: (
<Translation>
If Switch is turned off, The configuration will be reset. Are you
sure you want to do this?
The configuration will be reset if the switch is turned off. Are you
sure want to do this?
</Translation>
),
onOk: () => {
Expand Down
2 changes: 1 addition & 1 deletion src/locals/Zh/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"Instructions for assessing whether the container is alive.": "容器健康状态探针",
"Specify the annotations in the workload": "指定工作负载的注释",
"Specify the labels in the workload": "指定工作负载的标签",
"If Switch is turned off, The configuration will be reset. Are you sure you want to do this?": "如果关闭,配置将重置。确定操作吗?",
"The configuration will be reset if the switch is turned off. Are you sure want to do this?": "如果关闭,配置将重置。确定操作吗?",
"Mount PVC type volume": "挂载 PVC 数据卷",
"Mount HostPath type volume": "挂载 HostPath 数据卷",
"Mount EmptyDir type volume": "挂载 EmptyDir 数据卷",
Expand Down

0 comments on commit 7d64df9

Please sign in to comment.