Fix issue where we were saving the entire datasource definition into every datasource setting
This commit is contained in:
parent
256f177fd5
commit
4be3f0a320
|
@ -29,7 +29,7 @@
|
|||
on:click={() => onSelect(data)}
|
||||
>
|
||||
<span class="spectrum-Menu-itemLabel">
|
||||
{data.datasource?.name ? `${data.datasource.name} - ` : ""}{data.label}
|
||||
{data.datasourceName ? `${data.datasourceName} - ` : ""}{data.label}
|
||||
</span>
|
||||
<svg
|
||||
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
export const datasourceSelect = {
|
||||
table: (table, datasources) => ({
|
||||
table: (table, datasources) => {
|
||||
const sourceId = table.sourceId || table.datasourceId
|
||||
const datasource = datasources.find(ds => ds._id === sourceId)
|
||||
return {
|
||||
label: table.name,
|
||||
tableId: table._id,
|
||||
type: "table",
|
||||
datasource: datasources.find(
|
||||
datasource => datasource._id === table.sourceId || table.datasourceId
|
||||
),
|
||||
}),
|
||||
datasourceName: datasource?.name,
|
||||
}
|
||||
},
|
||||
viewV2: view => ({
|
||||
...view,
|
||||
label: view.name,
|
||||
|
|
Loading…
Reference in New Issue