mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 14:16:01 +00:00
remove links in table editor
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
import ConstraintLabel from '../elements/ConstraintLabel.svelte';
|
||||
|
||||
import ObjectListControl from '../elements/ObjectListControl.svelte';
|
||||
import Link from './Link.svelte';
|
||||
|
||||
export let collection;
|
||||
export let title;
|
||||
export let clickable;
|
||||
export let onRemove = null;
|
||||
</script>
|
||||
|
||||
<ObjectListControl
|
||||
@@ -38,9 +40,17 @@
|
||||
fieldName: 'deleteAction',
|
||||
header: 'ON DELETE',
|
||||
},
|
||||
onRemove
|
||||
? {
|
||||
fieldName: 'actions',
|
||||
sortable: true,
|
||||
slot: 2,
|
||||
}
|
||||
: null,
|
||||
]}
|
||||
>
|
||||
<svelte:fragment slot="name" let:row><ConstraintLabel {...row} /></svelte:fragment>
|
||||
<svelte:fragment slot="0" let:row>{row?.columns.map(x => x.columnName).join(', ')}</svelte:fragment>
|
||||
<svelte:fragment slot="1" let:row>{row?.columns.map(x => x.refColumnName).join(', ')}</svelte:fragment>
|
||||
<svelte:fragment slot="2" let:row><Link onClick={() => onRemove(row)}>Remove</Link></svelte:fragment>
|
||||
</ObjectListControl>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
{#each columnList as col}
|
||||
<td>{col.header}</td>
|
||||
<td>{col.header || ''}</td>
|
||||
{/each}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user