diff --git a/frontend/src/Editor/Components/Table/Table.jsx b/frontend/src/Editor/Components/Table/Table.jsx index 76f19473f2..9e75de5ad0 100644 --- a/frontend/src/Editor/Components/Table/Table.jsx +++ b/frontend/src/Editor/Components/Table/Table.jsx @@ -360,7 +360,7 @@ export function Table({
{ if (e.key === 'Enter') { if (e.target.defaultValue !== e.target.value) { @@ -400,7 +400,9 @@ export function Table({ readOnly={!column.isEditable} style={{ maxWidth: width, minWidth: width - 10 }} onBlur={(e) => { - handleCellValueChange(cell.row.index, column.key || column.name, e.target.value, cell.row.original); + if (column.isEditable) { + handleCellValueChange(cell.row.index, column.key || column.name, e.target.value, cell.row.original); + } }} defaultValue={cellValue} > @@ -561,65 +563,65 @@ export function Table({ const leftActionsCellData = leftActions().length > 0 ? [ - { - id: 'leftActions', - Header: 'Actions', - accessor: 'edit', - width: columnSizes.leftActions || defaultColumn.width, - Cell: (cell) => { - return leftActions().map((action) => ( - - )); + { + id: 'leftActions', + Header: 'Actions', + accessor: 'edit', + width: columnSizes.leftActions || defaultColumn.width, + Cell: (cell) => { + return leftActions().map((action) => ( + + )); + }, }, - }, - ] + ] : []; const rightActionsCellData = rightActions().length > 0 ? [ - { - id: 'rightActions', - Header: 'Actions', - accessor: 'edit', - width: columnSizes.rightActions || defaultColumn.width, - Cell: (cell) => { - return rightActions().map((action) => ( - - )); + { + id: 'rightActions', + Header: 'Actions', + accessor: 'edit', + width: columnSizes.rightActions || defaultColumn.width, + Cell: (cell) => { + return rightActions().map((action) => ( + + )); + }, }, - }, - ] + ] : []; const IndeterminateCheckbox = React.forwardRef(({ indeterminate, ...rest }, ref) => { @@ -745,7 +747,7 @@ export function Table({ if (!serverSidePagination && clientSidePagination) { setPageSize(10); } - }, [clientSidePagination, serverSidePagination]); + }, [clientSidePagination, serverSidePagination, rows]); useEffect(() => { const pageData = page.map((row) => row.original); @@ -835,8 +837,9 @@ export function Table({ return ( { e.stopPropagation(); @@ -898,62 +901,62 @@ export function Table({ Object.keys(componentState.changeSet || {}).length > 0 || showFilterButton || showDownloadButton) && ( -
-
-
- {(clientSidePagination || serverSidePagination) && ( - - )} -
- - {showBulkUpdateActions && Object.keys(componentState.changeSet || {}).length > 0 && ( -
- - -
+
+
+
+ {(clientSidePagination || serverSidePagination) && ( + )} +
-
- {showFilterButton && ( - showFilters()}> - - {filters.length > 0 && ( - - )} - - )} - {showDownloadButton && ( - exportData('csv', true)} - > - - - )} + {showBulkUpdateActions && Object.keys(componentState.changeSet || {}).length > 0 && ( +
+ +
+ )} + +
+ {showFilterButton && ( + showFilters()}> + + {filters.length > 0 && ( + + )} + + )} + {showDownloadButton && ( + exportData('csv', true)} + > + + + )}
- )} +
+ )} {isFiltersVisible && (