Skip to content

Commit ba2839b

Browse files
authored
fix(config-ui): no transformation cannot be set (#5115)
1 parent 06571b6 commit ba2839b

File tree

1 file changed

+20
-17
lines changed
  • config-ui/src/plugins/components/transformation

1 file changed

+20
-17
lines changed

config-ui/src/plugins/components/transformation/index.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,26 @@ export const Transformation = ({
123123
dataIndex: 'transformationRuleName',
124124
key: 'transformation',
125125
align: 'center',
126-
render: (val, row) => (
127-
<div>
128-
<span>{val ?? 'N/A'}</span>
129-
<IconButton
130-
icon="one-to-one"
131-
tooltip="Associate Transformation"
132-
onClick={() => {
133-
setSelected({
134-
...selected,
135-
[`${cs.unique}`]: [row[getPluginId(cs.plugin)]],
136-
});
137-
setConnection(cs);
138-
setTid(row.transformationRuleId);
139-
}}
140-
/>
141-
</div>
142-
),
126+
render: (val, row) =>
127+
cs.transformationType === 'none' ? (
128+
'N/A'
129+
) : (
130+
<div>
131+
<span>{val ?? 'N/A'}</span>
132+
<IconButton
133+
icon="one-to-one"
134+
tooltip="Associate Transformation"
135+
onClick={() => {
136+
setSelected({
137+
...selected,
138+
[`${cs.unique}`]: [row[getPluginId(cs.plugin)]],
139+
});
140+
setConnection(cs);
141+
setTid(row.transformationRuleId);
142+
}}
143+
/>
144+
</div>
145+
),
143146
},
144147
]}
145148
dataSource={cs.origin}

0 commit comments

Comments
 (0)