diff --git a/packages/web/src/datagrid/DataGridCell.svelte b/packages/web/src/datagrid/DataGridCell.svelte index 2d17a2c5..9a49ca25 100644 --- a/packages/web/src/datagrid/DataGridCell.svelte +++ b/packages/web/src/datagrid/DataGridCell.svelte @@ -96,7 +96,9 @@ class:isFocusedColumn {style} > - {#if value === null} + {#if rowData == null} + (No row) + {:else if value === null} (NULL) {:else if value === undefined} (No field) diff --git a/packages/web/src/datagrid/InplaceEditor.svelte b/packages/web/src/datagrid/InplaceEditor.svelte index 4a1829a6..3e0024ce 100644 --- a/packages/web/src/datagrid/InplaceEditor.svelte +++ b/packages/web/src/datagrid/InplaceEditor.svelte @@ -28,6 +28,7 @@ export let onSetValue; export let width; export let cellValue; + export let fillParent=false; let domEditor; @@ -89,6 +90,7 @@ on:blur={handleBlur} bind:this={domEditor} style={widthCopy ? `width:${widthCopy}px;min-width:${widthCopy}px;max-width:${widthCopy}px` : undefined} + class:fillParent /> diff --git a/packages/web/src/formview/FormView.svelte b/packages/web/src/formview/FormView.svelte index f1709095..190a789b 100644 --- a/packages/web/src/formview/FormView.svelte +++ b/packages/web/src/formview/FormView.svelte @@ -398,7 +398,9 @@ } else { // @ts-ignore event.preventDefault(); - dispatchInsplaceEditor({ type: 'show', text: event.key, cell: currentCell }); + if (rowData) { + dispatchInsplaceEditor({ type: 'show', text: event.key, cell: currentCell }); + } } } @@ -425,7 +427,9 @@ if (event.keyCode == keycodes.f2) { // @ts-ignore - dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true }); + if (rowData) { + dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true }); + } } handleCursorMove(event); @@ -544,8 +548,9 @@ isCurrentCell={currentCell[0] == rowIndex && currentCell[1] == chunkIndex * 2 + 1} onDictionaryLookup={() => handleLookup(col)} > - {#if $inplaceEditorState.cell && rowIndex == $inplaceEditorState.cell[0] && chunkIndex * 2 + 1 == $inplaceEditorState.cell[1]} + {#if rowData && $inplaceEditorState.cell && rowIndex == $inplaceEditorState.cell[0] && chunkIndex * 2 + 1 == $inplaceEditorState.cell[1]}