diff --git a/src/components/Table/TableCell/EditorCellTextField.tsx b/src/components/Table/TableCell/EditorCellTextField.tsx
index 3d89d8be..1f3cb155 100644
--- a/src/components/Table/TableCell/EditorCellTextField.tsx
+++ b/src/components/Table/TableCell/EditorCellTextField.tsx
@@ -55,6 +55,7 @@ export default function EditorCellTextField({
width: "100%",
height: "calc(100% - 1px)",
marginTop: "1px",
+ padding: 0,
paddingBottom: "1px",
backgroundColor: "var(--cell-background-color)",
@@ -70,7 +71,7 @@ export default function EditorCellTextField({
lineHeight: (theme) => theme.typography.body2.lineHeight,
maxHeight: "100%",
boxSizing: "border-box",
- py: 3 / 8,
+ py: 2 / 8,
},
},
...spreadSx(InputProps.sx),
diff --git a/src/components/Table/TableCell/withRenderTableCell.tsx b/src/components/Table/TableCell/withRenderTableCell.tsx
index 3a4d2d5f..a8f10f83 100644
--- a/src/components/Table/TableCell/withRenderTableCell.tsx
+++ b/src/components/Table/TableCell/withRenderTableCell.tsx
@@ -111,7 +111,7 @@ export default function withTableCell(
row: row.original,
column: column.columnDef.meta!,
_rowy_ref: row.original._rowy_ref,
- disabled: column.columnDef.meta!.editable === false,
+ disabled,
tabIndex: focusInsideCell ? 0 : -1,
showPopoverCell,
setFocusInsideCell,
diff --git a/src/components/fields/Action/DisplayCell.tsx b/src/components/fields/Action/DisplayCell.tsx
index 78871401..264f55be 100644
--- a/src/components/fields/Action/DisplayCell.tsx
+++ b/src/components/fields/Action/DisplayCell.tsx
@@ -1,5 +1,6 @@
import { IDisplayCellProps } from "@src/components/fields/types";
import { get } from "lodash-es";
+import { sanitiseCallableName, isUrl } from "./utils";
export const getActionName = (column: IDisplayCellProps["column"]) => {
const config = get(column, "config");
@@ -10,5 +11,19 @@ export const getActionName = (column: IDisplayCellProps["column"]) => {
};
export default function Action({ value, column }: IDisplayCellProps) {
- return <>{value ? value.status : getActionName(column)}>;
+ const hasRan = value && ![null, undefined].includes(value.status);
+
+ return (
+
+ {hasRan && isUrl(value.status) ? (
+
+ {value.status}
+
+ ) : hasRan ? (
+ value.status
+ ) : (
+ sanitiseCallableName(getActionName(column))
+ )}
+
+ );
}
diff --git a/src/components/fields/Checkbox/DisplayCell.tsx b/src/components/fields/Checkbox/DisplayCell.tsx
index 67943586..65af2709 100644
--- a/src/components/fields/Checkbox/DisplayCell.tsx
+++ b/src/components/fields/Checkbox/DisplayCell.tsx
@@ -6,7 +6,16 @@ export default function Checkbox({ column, value }: IDisplayCellProps) {
return (
+
}
label={column.name as string}
labelPlacement="start"
@@ -15,6 +24,8 @@ export default function Checkbox({ column, value }: IDisplayCellProps) {
width: "100%",
alignItems: "center",
+ cursor: "default",
+
"& .MuiFormControlLabel-label": {
font: "inherit",
letterSpacing: "inherit",
diff --git a/src/components/fields/Code/DisplayCell.tsx b/src/components/fields/Code/DisplayCell.tsx
index 215266f2..dc9b5bd1 100644
--- a/src/components/fields/Code/DisplayCell.tsx
+++ b/src/components/fields/Code/DisplayCell.tsx
@@ -12,7 +12,7 @@ export default function Code({ value }: IDisplayCellProps) {
style={{
width: "100%",
maxHeight: "100%",
- padding: theme.spacing(1, 0),
+ padding: "3px 0",
whiteSpace: "pre-wrap",
lineHeight: theme.typography.body2.lineHeight,
diff --git a/src/components/fields/File/DisplayCell.tsx b/src/components/fields/File/DisplayCell.tsx
index 36d82d64..f92d21e6 100644
--- a/src/components/fields/File/DisplayCell.tsx
+++ b/src/components/fields/File/DisplayCell.tsx
@@ -26,11 +26,13 @@ export default function File_({
}
label={file.name}
- onClick={(e) => {
- window.open(file.downloadURL);
- e.stopPropagation();
- }}
- style={{ width: "100%" }}
+ onClick={(e: any) => e.stopPropagation()}
+ component="a"
+ href={file.downloadURL}
+ target="_blank"
+ rel="noopener noreferrer"
+ clickable
+ style={{ width: "100%", cursor: "pointer" }}
tabIndex={tabIndex}
/>
diff --git a/src/components/fields/File/EditorCell.tsx b/src/components/fields/File/EditorCell.tsx
index c738f9d4..adcea801 100644
--- a/src/components/fields/File/EditorCell.tsx
+++ b/src/components/fields/File/EditorCell.tsx
@@ -117,10 +117,12 @@ export default function File_({
}
label={file.name}
- onClick={(e) => {
- window.open(file.downloadURL);
- e.stopPropagation();
- }}
+ onClick={(e: any) => e.stopPropagation()}
+ component="a"
+ href={file.downloadURL}
+ target="_blank"
+ rel="noopener noreferrer"
+ clickable
onDelete={
disabled
? undefined
@@ -134,7 +136,7 @@ export default function File_({
})
}
tabIndex={tabIndex}
- style={{ width: "100%" }}
+ style={{ width: "100%", cursor: "pointer" }}
/>
diff --git a/src/components/fields/Json/DisplayCell.tsx b/src/components/fields/Json/DisplayCell.tsx
index 82a1eea1..bc97afa0 100644
--- a/src/components/fields/Json/DisplayCell.tsx
+++ b/src/components/fields/Json/DisplayCell.tsx
@@ -15,7 +15,7 @@ export default function Json({ value }: IDisplayCellProps) {
style={{
width: "100%",
maxHeight: "100%",
- padding: theme.spacing(1, 0),
+ padding: "3px 0",
whiteSpace: "pre-wrap",
lineHeight: theme.typography.body2.lineHeight,
diff --git a/src/components/fields/LongText/DisplayCell.tsx b/src/components/fields/LongText/DisplayCell.tsx
index 1e8e0fc2..cc285625 100644
--- a/src/components/fields/LongText/DisplayCell.tsx
+++ b/src/components/fields/LongText/DisplayCell.tsx
@@ -9,7 +9,7 @@ export default function LongText({ value }: IDisplayCellProps) {
+ {value}
{getLabel(value, sortedConditions)}
);