diff --git a/packages/web/src/datagrid/DataGridCell.svelte b/packages/web/src/datagrid/DataGridCell.svelte index 1fc87ccc6..2d17a2c59 100644 --- a/packages/web/src/datagrid/DataGridCell.svelte +++ b/packages/web/src/datagrid/DataGridCell.svelte @@ -58,7 +58,7 @@ export let isAutofillSelected = false; export let isFocusedColumn = false; export let domCell = undefined; - export let hideContent = false; + export let showSlot = false; export let onSetFormView; export let isDynamicStructure = false; export let isAutoFillMarker = false; @@ -96,61 +96,61 @@ class:isFocusedColumn {style} > - {#if hideContent} - - {:else} - {#if value === null} - (NULL) - {:else if value === undefined} - (No field) - {:else if _.isDate(value)} - {value.toString()} - {:else if value === true} - true - {:else if value === false} - false - {:else if _.isNumber(value)} - {formatNumber(value)} - {:else if _.isString(value)} - {#if dateTimeRegex.test(value)} - - {formatDateTime(value)} - - {:else} - {highlightSpecialCharacters(value)} - {/if} - {:else if value?.type == 'Buffer' && _.isArray(value.data)} - {#if value.data.length <= 16} - {arrayToHexString(value.data)} - {:else} - ({value.data.length} bytes) - {/if} - {:else if _.isPlainObject(value)} - (JSON) - {:else if _.isArray(value)} - [{value.length} items] + {#if value === null} + (NULL) + {:else if value === undefined} + (No field) + {:else if _.isDate(value)} + {value.toString()} + {:else if value === true} + true + {:else if value === false} + false + {:else if _.isNumber(value)} + {formatNumber(value)} + {:else if _.isString(value)} + {#if dateTimeRegex.test(value)} + + {formatDateTime(value)} + {:else} - {value.toString()} + {highlightSpecialCharacters(value)} {/if} + {:else if value?.type == 'Buffer' && _.isArray(value.data)} + {#if value.data.length <= 16} + {arrayToHexString(value.data)} + {:else} + ({value.data.length} bytes) + {/if} + {:else if _.isPlainObject(value)} + (JSON) + {:else if _.isArray(value)} + [{value.length} items] + {:else} + {value.toString()} + {/if} - {#if allowHintField && rowData && _.some(col.hintColumnNames, hintColumnName => rowData[hintColumnName])} - {col.hintColumnNames.map(hintColumnName => rowData[hintColumnName]).join(col.hintColumnDelimiter || ' ')} - {/if} + {#if allowHintField && rowData && _.some(col.hintColumnNames, hintColumnName => rowData[hintColumnName])} + {col.hintColumnNames.map(hintColumnName => rowData[hintColumnName]).join(col.hintColumnDelimiter || ' ')} + {/if} - {#if col.foreignKey && rowData && rowData[col.uniqueName] && !isCurrentCell} - onSetFormView(rowData, col)} /> - {/if} + {#if col.foreignKey && rowData && rowData[col.uniqueName] && !isCurrentCell} + onSetFormView(rowData, col)} /> + {/if} - {#if col.foreignKey && isCurrentCell && onDictionaryLookup} - - {/if} + {#if col.foreignKey && isCurrentCell && onDictionaryLookup} + {/if} {#if isAutoFillMarker}
{/if} + + {#if showSlot} + + {/if}