Skip to content

Commit 46a1203

Browse files
committed
Be sure to return the cell text
1 parent f8d7c13 commit 46a1203

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

js/data-frame/cell.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ const isShinyHtml = (x: any): x is CellHtmlValue => {
6262
};
6363
type CellValue = string | CellHtmlValue | null;
6464
const getCellValueText = (cellValue: CellValue) => {
65-
if (isShinyHtml(cellValue)) return cellValue.obj.html;
6665
if (cellValue === null) return "";
66+
if (isShinyHtml(cellValue)) return cellValue.obj.html;
6767
return cellValue;
6868
};
6969

@@ -472,6 +472,7 @@ export const TableBodyCell: FC<TableBodyCellProps> = ({
472472

473473
// TODO-future; Use faster way to make a deep copy
474474
const cellValueObjDeepCopy = JSON.parse(JSON.stringify(cellValue.obj));
475+
// Render the Shiny content asynchronously to the table's cell
475476
window.Shiny.renderContentAsync(tdRef.current, cellValueObjDeepCopy);
476477

477478
const curTdRef = tdRef.current;

shiny/www/py-shiny/data-frame/data-frame.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/py-shiny/data-frame/data-frame.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)