dataty pe in column manager and in form view

This commit is contained in:
Jan Prochazka
2022-04-03 10:35:29 +02:00
parent 045f6c6a47
commit cbb38b8edc
3 changed files with 7 additions and 1 deletions

View File

@@ -52,7 +52,7 @@
}} }}
/> />
{/if} {/if}
<ColumnLabel {...column} /> <ColumnLabel {...column} showDataType />
</div> </div>
<style> <style>

View File

@@ -15,6 +15,8 @@
export let headerText = ''; export let headerText = '';
export let columnName = ''; export let columnName = '';
export let extInfo = null; export let extInfo = null;
export let dataType = null;
export let showDataType = false;
$: icon = getColumnIcon($$props, forceIcon); $: icon = getColumnIcon($$props, forceIcon);
</script> </script>
@@ -27,6 +29,9 @@
{#if extInfo} {#if extInfo}
<span class="extinfo">{extInfo}</span> <span class="extinfo">{extInfo}</span>
{/if} {/if}
{#if showDataType && dataType}
<span class="extinfo">{dataType.toLowerCase()}</span>
{/if}
</span> </span>
<style> <style>

View File

@@ -567,6 +567,7 @@
{...col} {...col}
headerText={col.columnName} headerText={col.columnName}
extInfo={col.foreignKey ? ` -> ${col.foreignKey.refTableName}` : null} extInfo={col.foreignKey ? ` -> ${col.foreignKey.refTableName}` : null}
showDataType={!col.foreignKey}
/> />
</div> </div>
</td> </td>