fixed showing FK hint in form view

This commit is contained in:
Jan Prochazka
2021-04-18 11:49:23 +02:00
parent 49f8fb71e4
commit cef6b8520e
5 changed files with 6 additions and 5 deletions

View File

@@ -21,5 +21,5 @@
{#if $settings}
<Screen />
{:else}
<LoadingInfo message="Loading settings..." />
<LoadingInfo message="Loading settings..." wrapper />
{/if}

View File

@@ -25,7 +25,7 @@
export let col;
export let rowData;
export let colIndex = undefined;
export let hintFieldsAllowed = undefined;
export let allowHintField = false;
export let isSelected = false;
export let isFrameSelected = false;
@@ -107,7 +107,7 @@
{value.toString()}
{/if}
{#if hintFieldsAllowed && hintFieldsAllowed.includes(col.uniqueName) && rowData && rowData[col.hintColumnName]}
{#if allowHintField && rowData && rowData[col.hintColumnName]}
<span class="hint">{rowData[col.hintColumnName]}</span>
{/if}

View File

@@ -51,7 +51,7 @@
{rowIndex}
{rowData}
{col}
{hintFieldsAllowed}
allowHintField={hintFieldsAllowed?.includes(col.uniqueName)}
isSelected={frameSelection ? false : cellIsSelected(rowIndex, col.colIndex, selectedCells)}
isFrameSelected={frameSelection ? cellIsSelected(rowIndex, col.colIndex, selectedCells) : false}
isAutofillSelected={cellIsSelected(rowIndex, col.colIndex, autofillSelectedCells)}

View File

@@ -477,6 +477,7 @@
colIndex={chunkIndex * 2 + 1}
isSelected={currentCell[0] == rowIndex && currentCell[1] == chunkIndex * 2 + 1}
isModifiedCell={rowStatus.modifiedFields && rowStatus.modifiedFields.has(col.uniqueName)}
allowHintField={!(rowStatus.modifiedFields && rowStatus.modifiedFields.has(col.uniqueName))}
bind:domCell={domCells[`${rowIndex},${chunkIndex * 2 + 1}`]}
onSetFormView={handleSetFormView}
hideContent={!rowData ||

View File

@@ -39,7 +39,7 @@
<FormCheckboxField name="dataGrid.hideLeftColumn" label="Hide left column by default" />
<FormTextField
name="dataGrid.pageSize"
label="Page size (number of rows for incremental loading)"
label="Page size (number of rows for incremental loading, must be between 5 and 1000)"
defaultValue="100"
/>
<FormCheckboxField name="dataGrid.showHintColumns" label="Show foreign key hints" defaultValue={true} />