fix: fix the instance-volume in form items
fix the delete checkbox to get better extensions Change-Id: Iab9a7c5c2e609d8794369ea52c7c07e0b0d941e8
This commit is contained in:
parent
72b81c645e
commit
8401c5b546
@ -141,7 +141,7 @@ export default class InstanceVolume extends React.Component {
|
|||||||
errorMsg,
|
errorMsg,
|
||||||
minSize,
|
minSize,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { name } = this.props;
|
const { name, showDelete = true } = this.props;
|
||||||
const selects = (
|
const selects = (
|
||||||
<Select
|
<Select
|
||||||
value={type}
|
value={type}
|
||||||
@ -160,11 +160,11 @@ export default class InstanceVolume extends React.Component {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const deleteValue = deleteType === 1;
|
const deleteValue = deleteType === 1;
|
||||||
const checkbox = (
|
const checkbox = showDelete ? (
|
||||||
<Checkbox onChange={this.onDeleteChange} checked={deleteValue}>
|
<Checkbox onChange={this.onDeleteChange} checked={deleteValue}>
|
||||||
{t('Deleted with the instance')}
|
{t('Deleted with the instance')}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
);
|
) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
Loading…
Reference in New Issue
Block a user