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} {#if $settings}
<Screen /> <Screen />
{:else} {:else}
<LoadingInfo message="Loading settings..." /> <LoadingInfo message="Loading settings..." wrapper />
{/if} {/if}

View File

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

View File

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

View File

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

View File

@@ -39,7 +39,7 @@
<FormCheckboxField name="dataGrid.hideLeftColumn" label="Hide left column by default" /> <FormCheckboxField name="dataGrid.hideLeftColumn" label="Hide left column by default" />
<FormTextField <FormTextField
name="dataGrid.pageSize" 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" defaultValue="100"
/> />
<FormCheckboxField name="dataGrid.showHintColumns" label="Show foreign key hints" defaultValue={true} /> <FormCheckboxField name="dataGrid.showHintColumns" label="Show foreign key hints" defaultValue={true} />