fix(config-ui): no transformation cannot be set (#5115)
diff --git a/config-ui/src/plugins/components/transformation/index.tsx b/config-ui/src/plugins/components/transformation/index.tsx
index 570a1f4..ebf6bda 100644
--- a/config-ui/src/plugins/components/transformation/index.tsx
+++ b/config-ui/src/plugins/components/transformation/index.tsx
@@ -123,23 +123,26 @@
dataIndex: 'transformationRuleName',
key: 'transformation',
align: 'center',
- render: (val, row) => (
- <div>
- <span>{val ?? 'N/A'}</span>
- <IconButton
- icon="one-to-one"
- tooltip="Associate Transformation"
- onClick={() => {
- setSelected({
- ...selected,
- [`${cs.unique}`]: [row[getPluginId(cs.plugin)]],
- });
- setConnection(cs);
- setTid(row.transformationRuleId);
- }}
- />
- </div>
- ),
+ render: (val, row) =>
+ cs.transformationType === 'none' ? (
+ 'N/A'
+ ) : (
+ <div>
+ <span>{val ?? 'N/A'}</span>
+ <IconButton
+ icon="one-to-one"
+ tooltip="Associate Transformation"
+ onClick={() => {
+ setSelected({
+ ...selected,
+ [`${cs.unique}`]: [row[getPluginId(cs.plugin)]],
+ });
+ setConnection(cs);
+ setTid(row.transformationRuleId);
+ }}
+ />
+ </div>
+ ),
},
]}
dataSource={cs.origin}