mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-07 15:12:14 +08:00
修复 Topic Config 编辑表单不能正确回显当前值的问题
This commit is contained in:
@@ -26,10 +26,14 @@ export const ConfigurationEdit = (props: any) => {
|
|||||||
props.setVisible(false);
|
props.setVisible(false);
|
||||||
props.genData({ pageNo: 1, pageSize: 10 });
|
props.genData({ pageNo: 1, pageSize: 10 });
|
||||||
})
|
})
|
||||||
.catch((err: any) => { });
|
.catch((err: any) => {});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
form.setFieldsValue(props.record);
|
||||||
|
}, [props.record]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
title={
|
title={
|
||||||
@@ -43,6 +47,7 @@ export const ConfigurationEdit = (props: any) => {
|
|||||||
visible={props.visible}
|
visible={props.visible}
|
||||||
onClose={() => props.setVisible(false)}
|
onClose={() => props.setVisible(false)}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
destroyOnClose
|
||||||
extra={
|
extra={
|
||||||
<Space>
|
<Space>
|
||||||
<Button size="small" onClick={onClose}>
|
<Button size="small" onClick={onClose}>
|
||||||
@@ -76,7 +81,7 @@ export const ConfigurationEdit = (props: any) => {
|
|||||||
{props.record?.documentation || '-'}
|
{props.record?.documentation || '-'}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Form form={form} layout={'vertical'} initialValues={props.record}>
|
<Form form={form} layout={'vertical'}>
|
||||||
<Form.Item name="defaultValue" label="Kafka默认配置">
|
<Form.Item name="defaultValue" label="Kafka默认配置">
|
||||||
<Input disabled />
|
<Input disabled />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export const getTopicMessagesColmns = () => {
|
|||||||
key: 'partitionId',
|
key: 'partitionId',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'offset',
|
title: 'Offset',
|
||||||
dataIndex: 'offset',
|
dataIndex: 'offset',
|
||||||
key: 'offset',
|
key: 'offset',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user