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.

improvement: table cell selection followups (styling, renaming, tests) (#3999)

Myles Scolnick7d0e38433329
diff --git a/frontend/src/components/data-table/__test__/__snapshots__/chart-spec-model.test.ts.snap b/frontend/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap
similarity index 100%
rename from frontend/src/components/data-table/__test__/__snapshots__/chart-spec-model.test.ts.snap
rename to frontend/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap
diff --git a/frontend/src/components/data-table/__test__/chart-spec-model.test.ts b/frontend/src/components/data-table/__tests__/chart-spec-model.test.ts
similarity index 100%
rename from frontend/src/components/data-table/__test__/chart-spec-model.test.ts
rename to frontend/src/components/data-table/__tests__/chart-spec-model.test.ts
diff --git a/frontend/src/components/data-table/__test__/column_formatting.test.ts b/frontend/src/components/data-table/__tests__/column_formatting.test.ts
similarity index 100%
rename from frontend/src/components/data-table/__test__/column_formatting.test.ts
rename to frontend/src/components/data-table/__tests__/column_formatting.test.ts
diff --git a/frontend/src/components/data-table/__test__/columns.test.tsx b/frontend/src/components/data-table/__tests__/columns.test.tsx
similarity index 100%
rename from frontend/src/components/data-table/__test__/columns.test.tsx
rename to frontend/src/components/data-table/__tests__/columns.test.tsx
diff --git a/frontend/src/components/data-table/__test__/pagination.test.tsx b/frontend/src/components/data-table/__tests__/pagination.test.tsx
similarity index 100%
rename from frontend/src/components/data-table/__test__/pagination.test.tsx
rename to frontend/src/components/data-table/__tests__/pagination.test.tsx
diff --git a/frontend/src/components/data-table/__test__/useColumnPinning.test.ts b/frontend/src/components/data-table/__tests__/useColumnPinning.test.ts
similarity index 100%
rename from frontend/src/components/data-table/__test__/useColumnPinning.test.ts
rename to frontend/src/components/data-table/__tests__/useColumnPinning.test.ts
diff --git a/frontend/src/components/data-table/cell-selection/__tests__/feature.test.ts b/frontend/src/components/data-table/cell-selection/__tests__/feature.test.ts
new file mode 100644
index 0000000000..184d3fce64
--- /dev/null
+++ b/frontend/src/components/data-table/cell-selection/__tests__/feature.test.ts
@@ -0,0 +1,158 @@
+/* Copyright 2024 Marimo. All rights reserved. */
+/* eslint-disable @typescript-eslint/no-explicit-any */
+import { describe, it, expect, vi } from "vitest";
+import { CellSelectionFeature } from "../feature";
+import type { Table, Row, Cell, Column } from "@tanstack/react-table";
+import { INDEX_COLUMN_NAME } from "../../types";
+import type { CellSelectionTableState } from "../types";
+
+describe("CellSelectionFeature", () => {
+ // Mock table setup
+ const createMockTable = () => {
+ const state: CellSelectionTableState = {
+ cellSelection: [],
+ };
+
+ const table = {
+ getState: () => state,
+ setState: vi.fn((updater) => {
+ const newState = updater(state);
+ state.cellSelection = newState.cellSelection;
+ return newState;
+ }),
+ options: {
+ enableMultiCellSelection: true,
+ onCellSelectionChange: vi.fn(),
+ },
+ setCellSelection: undefined as any,
+ };
+
+ // Initialize the table with the feature
+ CellSelectionFeature.createTable?.(table as unknown as Table<any>);
+
+ return { table, state };
+ };
+
+ const createMockCell = (rowId: string, columnId: string, table: any) => {
+ // Create mock row
+ const row: Partial<Row<any>> = {
+ id: rowId,
+ [INDEX_COLUMN_NAME]: rowId,
+ } as any;
+
+ // Create mock column
+ const column: Partial<Column<any>> = {
+ id: columnId,
+ };
+
+ // Create mock cell
+ const cell: Partial<Cell<any, unknown>> = {};
+
+ // Initialize the cell with the feature
+ CellSelectionFeature.createCell?.(
+ cell as Cell<any, unknown>,
+ column as Column<any>,
+ row as Row<any>,
+ table as Table<any>,
+ );
+
+ return { cell, row, column };
+ };
+
+ describe("toggleSelected", () => {
+ it("should add cell to selection when not selected", () => {
+ const { table } = createMockTable();
+ const { cell } = createMockCell("row1", "col1", table);
+
+ cell.toggleSelected!(true);
+
+ expect(table.setState).toHaveBeenCalled();
+ expect(table.getState().cellSelection).toEqual([
+ { rowId: "row1", columnName: "col1" },
+ ]);
+ });
+
+ it("should remove only the specific cell from selection", () => {
+ const { table, state } = createMockTable();
+
+ // Pre-populate with multiple cells in the selection
+ state.cellSelection = [
+ { rowId: "row1", columnName: "col1" },
+ { rowId: "row1", columnName: "col2" },
+ { rowId: "row2", columnName: "col1" },
+ ];
+
+ const { cell } = createMockCell("row1", "col1", table);
+
+ // Deselect the cell
+ cell.toggleSelected!(false);
+
+ // It should only remove row1/col1, leaving the other cells
+ expect(table.getState().cellSelection).toEqual([
+ { rowId: "row1", columnName: "col2" },
+ { rowId: "row2", columnName: "col1" },
+ ]);
+ });
+
+ it("should preserve other cells in the same row when deselecting a cell", () => {
+ const { table, state } = createMockTable();
+
+ // Pre-populate with multiple cells in the same row
+ state.cellSelection = [
+ { rowId: "row1", columnName: "col1" },
+ { rowId: "row1", columnName: "col2" },
+ { rowId: "row1", columnName: "col3" },
+ ];
+
+ const { cell } = createMockCell("row1", "col1", table);
+
+ // Deselect the cell
+ cell.toggleSelected!(false);
+
+ // It should only remove row1/col1, preserving other cells in row1
+ expect(table.getState().cellSelection).toEqual([
+ { rowId: "row1", columnName: "col2" },
+ { rowId: "row1", columnName: "col3" },
+ ]);
+ });
+
+ it("should preserve other cells in the same column when deselecting a cell", () => {
+ const { table, state } = createMockTable();
+
+ // Pre-populate with multiple cells in the same column
+ state.cellSelection = [
+ { rowId: "row1", columnName: "col1" },
+ { rowId: "row2", columnName: "col1" },
+ { rowId: "row3", columnName: "col1" },
+ ];
+
+ const { cell } = createMockCell("row1", "col1", table);
+
+ // Deselect the cell
+ cell.toggleSelected!(false);
+
+ // It should only remove row1/col1, preserving other cells in col1
+ expect(table.getState().cellSelection).toEqual([
+ { rowId: "row2", columnName: "col1" },
+ { rowId: "row3", columnName: "col1" },
+ ]);
+ });
+
+ it("should toggle cell selection correctly", () => {
+ const { table } = createMockTable();
+ const { cell } = createMockCell("row1", "col1", table);
+
+ // First select
+ cell.toggleSelected!();
+
+ expect(table.getState().cellSelection).toEqual([
+ { rowId: "row1", columnName: "col1" },
+ ]);
+
+ // Then deselect
+ cell.toggleSelected!();
+
+ expect(table.getState().cellSelection).toEqual([]);
+ });
+ });
+});
diff --git a/frontend/src/components/data-table/cell-selection/feature.ts b/frontend/src/components/data-table/cell-selection/feature.ts
index abebfc2526..3ba1e412b5 100644
--- a/frontend/src/components/data-table/cell-selection/feature.ts
+++ b/frontend/src/components/data-table/cell-selection/feature.ts
@@ -114,7 +114,7 @@ export const CellSelectionFeature: TableFeature = {
if (table.options.enableMultiCellSelection) {
table.setCellSelection((selectedCells) =>
selectedCells.filter(
- (c) => c.rowId !== rowId && c.columnName !== columnName,
+ (c) => !(c.rowId === rowId && c.columnName === columnName),
),
);
} else {
diff --git a/frontend/src/components/data-table/columns.tsx b/frontend/src/components/data-table/columns.tsx
index 57ccc7d89c..4fa96058ec 100644
--- a/frontend/src/components/data-table/columns.tsx
+++ b/frontend/src/components/data-table/columns.tsx
@@ -369,7 +369,8 @@ function getCellStyleClass(
): string {
return cn(
canSelectCell && "cursor-pointer",
- isSelected && "bg-[var(--blue-2)]",
+ isSelected &&
+ "relative before:absolute before:inset-0 before:bg-[var(--blue-3)] before:rounded before:-z-10 before:mx-[-4px] before:my-[-2px]",
"w-full",
"text-left",
justify === "center" && "text-center",
diff --git a/marimo/_plugins/ui/_impl/table.py b/marimo/_plugins/ui/_impl/table.py
index 9c6aee26ab..905b175ae9 100644
--- a/marimo/_plugins/ui/_impl/table.py
+++ b/marimo/_plugins/ui/_impl/table.py
@@ -35,8 +35,8 @@ from marimo._plugins.ui._impl.tables.selection import (
add_selection_column,
)
from marimo._plugins.ui._impl.tables.table_manager import (
- Cell,
ColumnName,
+ TableCell,
TableCoordinate,
TableManager,
)
@@ -116,7 +116,7 @@ class GetRowIdsResponse:
class table(
UIElement[
Union[list[str], list[int], list[dict[str, Any]]],
- Union[list[JSONType], IntoDataFrame, list[Cell]],
+ Union[list[JSONType], IntoDataFrame, list[TableCell]],
]
):
"""A table component with selectable rows.
@@ -269,7 +269,7 @@ class table(
list[JSONType],
dict[str, ListOrTuple[JSONType]],
IntoDataFrame,
- list[Cell],
+ list[TableCell],
]
],
None,
@@ -461,10 +461,10 @@ class table(
def _convert_value(
self, value: Union[list[int], list[str], list[dict[str, Any]]]
- ) -> Union[list[JSONType], IntoDataFrame, list[Cell]]:
+ ) -> Union[list[JSONType], IntoDataFrame, list[TableCell]]:
if self._selection in ["single-cell", "multi-cell"]:
coordinates = [
- TableCoordinate(rowId=v["rowId"], columnName=v["columnName"])
+ TableCoordinate(row_id=v["rowId"], column_name=v["columnName"])
for v in value
if isinstance(v, dict) and "rowId" in v and "columnName" in v
]
diff --git a/marimo/_plugins/ui/_impl/tables/default_table.py b/marimo/_plugins/ui/_impl/tables/default_table.py
index ffc626980e..89232d0547 100644
--- a/marimo/_plugins/ui/_impl/tables/default_table.py
+++ b/marimo/_plugins/ui/_impl/tables/default_table.py
@@ -25,10 +25,10 @@ from marimo._plugins.ui._impl.tables.polars_table import (
PolarsTableManagerFactory,
)
from marimo._plugins.ui._impl.tables.table_manager import (
- Cell,
ColumnName,
FieldType,
FieldTypes,
+ TableCell,
TableCoordinate,
TableManager,
)
@@ -138,48 +138,48 @@ class DefaultTableManager(TableManager[JsonTableData]):
]
)
- def select_cells(self, cells: list[TableCoordinate]) -> list[Cell]:
- selected_cells: list[Cell] = []
+ def select_cells(self, cells: list[TableCoordinate]) -> list[TableCell]:
+ selected_cells: list[TableCell] = []
if (
self.is_column_oriented
and isinstance(self.data, dict)
and all(isinstance(v, list) for v in self.data.values())
):
- for rowId, columnName in cells:
- column = self.data[columnName]
+ for row_id, column_name in cells:
+ column = self.data[column_name]
if isinstance(column, Sequence):
selected_cells.append(
- Cell(
- rowId=rowId,
- columnName=columnName,
- value=column[int(rowId)],
+ TableCell(
+ row=row_id,
+ column=column_name,
+ value=column[int(row_id)],
)
)
elif isinstance(self.data, dict):
rows_of_dict = list(self.data.items())
- for rowId, columnName in cells:
+ for row_id, column_name in cells:
value = (
- rows_of_dict[int(rowId)][0]
- if columnName == "key"
- else rows_of_dict[int(rowId)][1]
+ rows_of_dict[int(row_id)][0]
+ if column_name == "key"
+ else rows_of_dict[int(row_id)][1]
)
selected_cells.append(
- Cell(rowId=rowId, columnName=columnName, value=value)
+ TableCell(row=row_id, column=column_name, value=value)
)
elif isinstance(self.data, list):
rows_of_list = self.data
- for rowId, columnName in cells:
- row_index = int(rowId)
+ for row_id, column_name in cells:
+ row_index = int(row_id)
if row_index < 0 or row_index > len(rows_of_list) - 1:
continue
row = rows_of_list[row_index]
- if isinstance(row, dict) and columnName in row:
+ if isinstance(row, dict) and column_name in row:
selected_cells.append(
- Cell(
- rowId=rowId,
- columnName=columnName,
- value=row[columnName],
+ TableCell(
+ row=row_id,
+ column=column_name,
+ value=row[column_name],
)
)
diff --git a/marimo/_plugins/ui/_impl/tables/ibis_table.py b/marimo/_plugins/ui/_impl/tables/ibis_table.py
index ad19a9bbc4..f6b5210067 100644
--- a/marimo/_plugins/ui/_impl/tables/ibis_table.py
+++ b/marimo/_plugins/ui/_impl/tables/ibis_table.py
@@ -18,9 +18,9 @@ from marimo._plugins.ui._impl.tables.polars_table import (
PolarsTableManagerFactory,
)
from marimo._plugins.ui._impl.tables.table_manager import (
- Cell,
ColumnName,
FieldType,
+ TableCell,
TableCoordinate,
TableManager,
TableManagerFactory,
@@ -76,7 +76,7 @@ class IbisTableManagerFactory(TableManagerFactory):
def select_cells(
self, _cells: list[TableCoordinate]
- ) -> list[Cell]:
+ ) -> list[TableCell]:
raise NotImplementedError("Cell selection not supported")
def drop_columns(
diff --git a/marimo/_plugins/ui/_impl/tables/narwhals_table.py b/marimo/_plugins/ui/_impl/tables/narwhals_table.py
index 49f375a7ed..2fef149b40 100644
--- a/marimo/_plugins/ui/_impl/tables/narwhals_table.py
+++ b/marimo/_plugins/ui/_impl/tables/narwhals_table.py
@@ -15,9 +15,9 @@ from marimo._plugins.ui._impl.tables.format import (
)
from marimo._plugins.ui._impl.tables.selection import INDEX_COLUMN_NAME
from marimo._plugins.ui._impl.tables.table_manager import (
- Cell,
ColumnName,
FieldType,
+ TableCell,
TableCoordinate,
TableManager,
)
@@ -102,10 +102,10 @@ class NarwhalsTableManager(
def select_columns(self, columns: list[str]) -> TableManager[Any]:
return self.with_new_data(self.data.select(columns))
- def select_cells(self, cells: list[TableCoordinate]) -> list[Cell]:
+ def select_cells(self, cells: list[TableCoordinate]) -> list[TableCell]:
df = self.as_frame()
if INDEX_COLUMN_NAME in df.columns:
- selection: list[Cell] = []
+ selection: list[TableCell] = []
for row, col in cells:
filtered: nw.DataFrame[Any] = df.filter(
nw.col(INDEX_COLUMN_NAME) == int(row)
@@ -113,13 +113,14 @@ class NarwhalsTableManager(
if filtered.is_empty():
continue
- filtered_row = filtered[[0]]
- selection.append(Cell(row, col, filtered_row.get_column(col)))
+ selection.append(
+ TableCell(row, col, filtered.get_column(col)[0])
+ )
return selection
else:
return [
- Cell(row, col, df.item(row=int(row), column=col))
+ TableCell(row, col, df.item(row=int(row), column=col))
for row, col in cells
]
diff --git a/marimo/_plugins/ui/_impl/tables/table_manager.py b/marimo/_plugins/ui/_impl/tables/table_manager.py
index 2eb065dedf..231516c6dc 100644
--- a/marimo/_plugins/ui/_impl/tables/table_manager.py
+++ b/marimo/_plugins/ui/_impl/tables/table_manager.py
@@ -3,7 +3,7 @@ from __future__ import annotations
import abc
from dataclasses import dataclass
-from typing import Any, Generic, NamedTuple, Optional, TypeVar
+from typing import Any, Generic, NamedTuple, Optional, TypeVar, Union
import marimo._output.data.data as mo_data
from marimo._data.models import ColumnSummary, DataType, ExternalDataType
@@ -18,16 +18,22 @@ FieldTypes = list[tuple[ColumnName, tuple[FieldType, ExternalDataType]]]
class TableCoordinate(NamedTuple):
- rowId: str
- columnName: str
+ row_id: Union[int, str]
+ column_name: str
@dataclass
-class Cell:
- rowId: str
- columnName: str
+class TableCell:
+ row: Union[int, str]
+ column: str
value: Any | None
+ def __getitem__(self, key: str) -> Any:
+ """Allow dictionary-style access to cell values."""
+ if key not in ["row", "column", "value"]:
+ raise KeyError(f"Invalid key: {key}")
+ return getattr(self, key)
+
class TableManager(abc.ABC, Generic[T]):
# Upper limit for column summaries
@@ -106,7 +112,7 @@ class TableManager(abc.ABC, Generic[T]):
pass
@abc.abstractmethod
- def select_cells(self, cells: list[TableCoordinate]) -> list[Cell]:
+ def select_cells(self, cells: list[TableCoordinate]) -> list[TableCell]:
pass
@abc.abstractmethod
diff --git a/marimo/_smoke_tests/tables/selection.py b/marimo/_smoke_tests/tables/selection.py
new file mode 100644
index 0000000000..98f58b7459
--- /dev/null
+++ b/marimo/_smoke_tests/tables/selection.py
@@ -0,0 +1,74 @@
+import marimo
+
+__generated_with = "0.11.16"
+app = marimo.App(width="medium")
+
+
+def _():
+ import marimo as mo
+ import polars as pl
+ return mo, pl
+
+
+def _(pl):
+ data = pl.DataFrame([range(11), range(11)])
+ data = data.to_dicts()
+ return (data,)
+
+
+def _(data, mo):
+ t1 = mo.ui.table(data, selection="single")
+ t1
+ return (t1,)
+
+
+def _(t1):
+ t1.value
+ return
+
+
+def _(data, mo):
+ t2 = mo.ui.table(data, selection="multi")
+ t2
+ return (t2,)
+
+
+def _(t2):
+ t2.value
+ return
+
+
+def _(data, mo):
+ t3 = mo.ui.table(data, selection="single-cell")
+ t3
+ return (t3,)
+
+
+def _(t3):
+ t3.value
+ return
+
+
+def _(data, mo):
+ t4 = mo.ui.table(data, selection="multi-cell")
+ t4
+ return (t4,)
+
+
+def _(t4):
+ t4.value
+ return
+
+
+if __name__ == "__main__":
+ app.run()
diff --git a/tests/_plugins/ui/_impl/tables/test_default_table.py b/tests/_plugins/ui/_impl/tables/test_default_table.py
index d5c361f1a8..b932b0718a 100644
--- a/tests/_plugins/ui/_impl/tables/test_default_table.py
+++ b/tests/_plugins/ui/_impl/tables/test_default_table.py
@@ -8,7 +8,10 @@ import pytest
from marimo._dependencies.dependencies import DependencyManager
from marimo._plugins.ui._impl.tables.default_table import DefaultTableManager
-from marimo._plugins.ui._impl.tables.table_manager import Cell, TableCoordinate
+from marimo._plugins.ui._impl.tables.table_manager import (
+ TableCell,
+ TableCoordinate,
+)
HAS_DEPS = DependencyManager.pandas.has()
@@ -51,15 +54,15 @@ class TestDefaultTable(unittest.TestCase):
def test_select_cells(self) -> None:
cells = [
- TableCoordinate(rowId=0, columnName="name"),
- TableCoordinate(rowId=1, columnName="age"),
- TableCoordinate(rowId=2, columnName="birth_year"),
+ TableCoordinate(row_id=0, column_name="name"),
+ TableCoordinate(row_id=1, column_name="age"),
+ TableCoordinate(row_id=2, column_name="birth_year"),
]
selected_cells = self.manager.select_cells(cells)
expected_cells = [
- Cell(rowId=0, columnName="name", value="Alice"),
- Cell(rowId=1, columnName="age", value=25),
- Cell(rowId=2, columnName="birth_year", value=date(1989, 12, 1)),
+ TableCell(row=0, column="name", value="Alice"),
+ TableCell(row=1, column="age", value=25),
+ TableCell(row=2, column="birth_year", value=date(1989, 12, 1)),
]
assert selected_cells == expected_cells
@@ -351,15 +354,15 @@ class TestColumnarDefaultTable(unittest.TestCase):
def test_select_cells(self) -> None:
cells = [
- TableCoordinate(rowId=0, columnName="name"),
- TableCoordinate(rowId=1, columnName="age"),
- TableCoordinate(rowId=2, columnName="birth_year"),
+ TableCoordinate(row_id=0, column_name="name"),
+ TableCoordinate(row_id=1, column_name="age"),
+ TableCoordinate(row_id=2, column_name="birth_year"),
]
selected_cells = self.manager.select_cells(cells)
expected_cells = [
- Cell(rowId=0, columnName="name", value="Alice"),
- Cell(rowId=1, columnName="age", value=25),
- Cell(rowId=2, columnName="birth_year", value=date(1989, 12, 1)),
+ TableCell(row=0, column="name", value="Alice"),
+ TableCell(row=1, column="age", value=25),
+ TableCell(row=2, column="birth_year", value=date(1989, 12, 1)),
]
assert selected_cells == expected_cells
@@ -638,13 +641,13 @@ class TestDictionaryDefaultTable(unittest.TestCase):
def test_select_cells(self) -> None:
selected_cells = self.manager.select_cells(
[
- TableCoordinate(rowId=0, columnName="key"),
- TableCoordinate(rowId=1, columnName="value"),
+ TableCoordinate(row_id=0, column_name="key"),
+ TableCoordinate(row_id=1, column_name="value"),
]
)
assert selected_cells == [
- Cell(rowId=0, columnName="key", value="a"),
- Cell(rowId=1, columnName="value", value=2),
+ TableCell(row=0, column="key", value="a"),
+ TableCell(row=1, column="value", value=2),
]
def test_drop_columns(self) -> None:
diff --git a/tests/_plugins/ui/_impl/tables/test_narwhals.py b/tests/_plugins/ui/_impl/tables/test_narwhals.py
index bdeee84106..19b08236e1 100644
--- a/tests/_plugins/ui/_impl/tables/test_narwhals.py
+++ b/tests/_plugins/ui/_impl/tables/test_narwhals.py
@@ -16,7 +16,7 @@ from marimo._plugins.ui._impl.tables.narwhals_table import (
NarwhalsTableManager,
)
from marimo._plugins.ui._impl.tables.table_manager import (
- Cell,
+ TableCell,
TableCoordinate,
TableManager,
)
@@ -182,19 +182,19 @@ class TestNarwhalsTableManagerFactory(unittest.TestCase):
def test_select_cells(self) -> None:
cells = [
- TableCoordinate(columnName="A", rowId=0),
- TableCoordinate(columnName="B", rowId=1),
- TableCoordinate(columnName="C", rowId=2),
- TableCoordinate(columnName="D", rowId=1),
- TableCoordinate(columnName="E", rowId=0),
+ TableCoordinate(column_name="A", row_id=0),
+ TableCoordinate(column_name="B", row_id=1),
+ TableCoordinate(column_name="C", row_id=2),
+ TableCoordinate(column_name="D", row_id=1),
+ TableCoordinate(column_name="E", row_id=0),
]
selected_cells = self.manager.select_cells(cells)
expected_cells = [
- Cell(columnName="A", rowId=0, value=1),
- Cell(columnName="B", rowId=1, value="b"),
- Cell(columnName="C", rowId=2, value=3.0),
- Cell(columnName="D", rowId=1, value=False),
- Cell(columnName="E", rowId=0, value=datetime.datetime(2021, 1, 1)),
+ TableCell(column="A", row=0, value=1),
+ TableCell(column="B", row=1, value="b"),
+ TableCell(column="C", row=2, value=3.0),
+ TableCell(column="D", row=1, value=False),
+ TableCell(column="E", row=0, value=datetime.datetime(2021, 1, 1)),
]
assert selected_cells == expected_cells
diff --git a/tests/_plugins/ui/_impl/test_table.py b/tests/_plugins/ui/_impl/test_table.py
index fd694b5441..cf387fd91e 100644
--- a/tests/_plugins/ui/_impl/test_table.py
+++ b/tests/_plugins/ui/_impl/test_table.py
@@ -11,7 +11,7 @@ from marimo._plugins import ui
from marimo._plugins.ui._impl.dataframes.transforms.types import Condition
from marimo._plugins.ui._impl.table import SearchTableArgs, SortArgs
from marimo._plugins.ui._impl.tables.default_table import DefaultTableManager
-from marimo._plugins.ui._impl.tables.table_manager import Cell
+from marimo._plugins.ui._impl.tables.table_manager import TableCell
from marimo._plugins.ui._impl.utils.dataframe import TableData
from marimo._runtime.functions import EmptyArgs
from marimo._runtime.runtime import Kernel
@@ -506,8 +506,8 @@ def test_value_with_cell_selection_then_sorting_dict_of_lists() -> None:
{"rowId": "2", "columnName": "company"},
]
) == [
- Cell(rowId="0", columnName="company", value="Company A"),
- Cell(rowId="2", columnName="company", value="Company C"),
+ TableCell(row="0", column="company", value="Company A"),
+ TableCell(row="2", column="company", value="Company C"),
]
table._search(
@@ -523,8 +523,8 @@ def test_value_with_cell_selection_then_sorting_dict_of_lists() -> None:
{"rowId": "2", "columnName": "company"},
]
) == [
- Cell(rowId="0", columnName="company", value="Company B"),
- Cell(rowId="2", columnName="company", value="Company E"),
+ TableCell(row="0", column="company", value="Company B"),
+ TableCell(row="2", column="company", value="Company E"),
]