Skip to content

Commit ccc7df9

Browse files
fix(datagrid-web): guard customContent reader on status and drop z from string fallback
Check exportValue status before reading .value to avoid silent empty-string on loading/unavailable. Drop format arg from fallback excelString — SheetJS ignores z on t:"s" cells so passing it was misleading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d8f6575 commit ccc7df9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • packages/pluggableWidgets/datagrid-web/src/features/data-export

packages/pluggableWidgets/datagrid-web/src/features/data-export/cell-readers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ const readers: ReadersByType = {
162162
},
163163

164164
customContent(item, props) {
165-
const value = props.exportValue?.get(item).value ?? "";
165+
const raw = props.exportValue?.get(item);
166+
if (!raw || raw.status !== "available") {
167+
return makeEmptyCell();
168+
}
169+
const value = raw.value ?? "";
166170
const { exportType } = props;
167171
const format = getCellFormat({
168172
exportType,
@@ -195,7 +199,7 @@ const readers: ReadersByType = {
195199
}
196200
}
197201

198-
return excelString(value, format);
202+
return excelString(value);
199203
}
200204
};
201205

0 commit comments

Comments
 (0)