修复 Topic Config 编辑表单不能正确回显当前值的问题

This commit is contained in:
GraceWalk
2022-09-13 14:43:35 +08:00
parent b3f8b46f0f
commit b11000715a
2 changed files with 8 additions and 3 deletions

View File

@@ -26,10 +26,14 @@ export const ConfigurationEdit = (props: any) => {
props.setVisible(false);
props.genData({ pageNo: 1, pageSize: 10 });
})
.catch((err: any) => { });
.catch((err: any) => {});
});
};
React.useEffect(() => {
form.setFieldsValue(props.record);
}, [props.record]);
return (
<Drawer
title={
@@ -43,6 +47,7 @@ export const ConfigurationEdit = (props: any) => {
visible={props.visible}
onClose={() => props.setVisible(false)}
maskClosable={false}
destroyOnClose
extra={
<Space>
<Button size="small" onClick={onClose}>
@@ -76,7 +81,7 @@ export const ConfigurationEdit = (props: any) => {
{props.record?.documentation || '-'}
</Col>
</Row>
<Form form={form} layout={'vertical'} initialValues={props.record}>
<Form form={form} layout={'vertical'}>
<Form.Item name="defaultValue" label="Kafka默认配置">
<Input disabled />
</Form.Item>

View File

@@ -77,7 +77,7 @@ export const getTopicMessagesColmns = () => {
key: 'partitionId',
},
{
title: 'offset',
title: 'Offset',
dataIndex: 'offset',
key: 'offset',
},