Resolve Report Center Issue.
This commit is contained in:
@@ -185,24 +185,14 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
||||
);
|
||||
}}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
shouldUpdate={(prev, cur) =>
|
||||
Templates[prev.key]?.idtype !== Templates[cur.key]?.idtype
|
||||
}
|
||||
style={{ display: "none", margin: 0, padding: 0 }}
|
||||
>
|
||||
{() => {
|
||||
form.setFieldsValue({ id: null });
|
||||
return null;
|
||||
}}
|
||||
</Form.Item>
|
||||
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
|
||||
{() => {
|
||||
const key = form.getFieldValue("key");
|
||||
const currentId = form.getFieldValue("id");
|
||||
if (!key) return null;
|
||||
//Kind of Id
|
||||
const idtype = Templates[key] && Templates[key].idtype;
|
||||
if (!idtype) {
|
||||
if (!idtype && currentId) {
|
||||
form.setFieldsValue({ id: null });
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user