MCPcopy Create free account
hub / github.com/HelloCSV/HelloCSV / getCellDisplayValue

Function getCellDisplayValue

src/sheet/utils.ts:143–160  ·  view source on GitHub ↗
(
  sheetDefinition: SheetDefinition,
  columnDefinition: SheetColumnDefinition,
  value: ImporterOutputFieldType,
  enumLabelDict: EnumLabelDict
)

Source from the content-addressed store, hash-verified

141}
142
143export function getCellDisplayValue(
144 sheetDefinition: SheetDefinition,
145 columnDefinition: SheetColumnDefinition,
146 value: ImporterOutputFieldType,
147 enumLabelDict: EnumLabelDict
148) {
149 const extractedValue = getColumnDisplayValue(
150 sheetDefinition,
151 columnDefinition,
152 value,
153 enumLabelDict
154 );
155
156 const valueEmpty = isEmptyCell(extractedValue);
157
158 // Use non-breaking space to keep the cell height
159 return { displayValue: valueEmpty ? '\u00A0' : extractedValue, valueEmpty };
160}

Callers 2

SheetDataEditorCellFunction · 0.90
useFilteredRowDataFunction · 0.85

Calls 2

getColumnDisplayValueFunction · 0.90
isEmptyCellFunction · 0.90

Tested by

no test coverage detected