diff --git a/frontend/src/components/nlp/components/NlpValue.tsx b/frontend/src/components/nlp/components/NlpValue.tsx index 894bee1c..12c462e8 100644 --- a/frontend/src/components/nlp/components/NlpValue.tsx +++ b/frontend/src/components/nlp/components/NlpValue.tsx @@ -81,6 +81,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => { }, }); const [selectedNlpValues, setSelectedNlpValues] = useState([]); + const shouldIncludeSynonyms = !nlpEntity?.lookups.includes("trait"); const actionColumns = useActionColumns( EntityType.NLP_VALUE, [ @@ -102,6 +103,19 @@ export const NlpValues = ({ entityId }: { entityId: string }) => { ], t("label.operations"), ); + const synonymsColumn = { + flex: 3, + field: "synonyms", + headerName: t("label.synonyms"), + sortable: true, + renderCell: (params) => { + return params.row?.expressions?.map((exp, index) => ( + + )); + }, + disableColumnMenu: true, + renderHeader, + }; const columns: GridColDef[] = [ { flex: 3, @@ -119,20 +133,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => { disableColumnMenu: true, renderHeader, }, - { - flex: 3, - field: "synonyms", - headerName: t("label.synonyms"), - sortable: true, - renderCell: (params) => { - return params.row?.expressions?.map((exp, index) => ( - - )); - }, - disableColumnMenu: true, - renderHeader, - }, - + ...(shouldIncludeSynonyms ? [synonymsColumn] : []), { maxWidth: 140, field: "createdAt",