Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

force wrap columns in data-table when needed (#2917)

Shahmir Varqha62e9915bb31f
diff --git a/frontend/src/components/data-table/__test__/columns.test.tsx b/frontend/src/components/data-table/__test__/columns.test.tsx
index f605b48a53..4e2a475d27 100644
--- a/frontend/src/components/data-table/__test__/columns.test.tsx
+++ b/frontend/src/components/data-table/__test__/columns.test.tsx
@@ -60,15 +60,15 @@ test("inferFieldTypes", () => {
],
"c": [
"unknown",
- "unknown",
+ "object",
],
"d": [
"unknown",
- "unknown",
+ "object",
],
"e": [
"unknown",
- "unknown",
+ "object",
],
"f": [
"boolean",
@@ -97,7 +97,7 @@ test("inferFieldTypes with nulls", () => {
],
"b": [
"unknown",
- "unknown",
+ "object",
],
}
`);
@@ -110,11 +110,11 @@ test("inferFieldTypes with mimetypes", () => {
{
"a": [
"unknown",
- "unknown",
+ "object",
],
"b": [
"unknown",
- "unknown",
+ "object",
],
}
`);
diff --git a/frontend/src/components/data-table/columns.tsx b/frontend/src/components/data-table/columns.tsx
index 6f44f00219..94a2e7efcf 100644
--- a/frontend/src/components/data-table/columns.tsx
+++ b/frontend/src/components/data-table/columns.tsx
@@ -291,6 +291,6 @@ function getCellStyleClass(
"text-left",
justify === "center" && "text-center",
justify === "right" && "text-right",
- wrapped && "whitespace-pre-wrap min-w-[200px]",
+ wrapped && "whitespace-pre-wrap min-w-[200px] break-words",
);
}