diff --git a/frontend/src/Editor/Components/Table/CustomSelect.jsx b/frontend/src/Editor/Components/Table/CustomSelect.jsx index 851c3f0ab2..17bd95929f 100644 --- a/frontend/src/Editor/Components/Table/CustomSelect.jsx +++ b/frontend/src/Editor/Components/Table/CustomSelect.jsx @@ -2,10 +2,19 @@ import React from 'react'; import SelectSearch from 'react-select-search'; import { useTranslation } from 'react-i18next'; -export const CustomSelect = ({ options, value, multiple, onChange, darkMode }) => { +export const CustomSelect = ({ options, value, multiple, onChange, darkMode, isEditable }) => { const { t } = useTranslation(); function renderValue(valueProps) { + if (!isEditable) { + const stringifyValue = String(valueProps.value); + const arrayOfValueProps = stringifyValue.includes(',') ? stringifyValue.split(', ') : stringifyValue.split(' '); + return arrayOfValueProps.map((value, index) => ( + + {value} + + )); + } if (valueProps) { const stringifyValue = String(valueProps.value); const arrayOfValueProps = stringifyValue.includes(',') ? stringifyValue.split(', ') : stringifyValue.split(' '); diff --git a/frontend/src/Editor/Components/Table/columns/index.jsx b/frontend/src/Editor/Components/Table/columns/index.jsx index f3898f4adf..e7ca8a66e7 100644 --- a/frontend/src/Editor/Components/Table/columns/index.jsx +++ b/frontend/src/Editor/Components/Table/columns/index.jsx @@ -313,6 +313,7 @@ export default function generateColumnsData({ handleCellValueChange(cell.row.index, column.key || column.name, value, cell.row.original); }} darkMode={darkMode} + isEditable={column.isEditable} /> ); diff --git a/frontend/src/Editor/Inspector/Components/Table.jsx b/frontend/src/Editor/Inspector/Components/Table.jsx index dab9a20625..18c5a6d6a3 100644 --- a/frontend/src/Editor/Inspector/Components/Table.jsx +++ b/frontend/src/Editor/Inspector/Components/Table.jsx @@ -256,7 +256,6 @@ class TableComponent extends React.Component { }} /> - {(column.columnType === 'string' || column.columnType === undefined || column.columnType === 'default') && (