Merge pull request #14422 from Budibase/fix/saving-full-ds-in-datasource-settings
Fix saving huge amounts of unnecessary data in settings
This commit is contained in:
commit
2fbc30ab08
|
@ -29,7 +29,7 @@
|
||||||
on:click={() => onSelect(data)}
|
on:click={() => onSelect(data)}
|
||||||
>
|
>
|
||||||
<span class="spectrum-Menu-itemLabel">
|
<span class="spectrum-Menu-itemLabel">
|
||||||
{data.datasource?.name ? `${data.datasource.name} - ` : ""}{data.label}
|
{data.datasourceName ? `${data.datasourceName} - ` : ""}{data.label}
|
||||||
</span>
|
</span>
|
||||||
<svg
|
<svg
|
||||||
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"
|
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
export const datasourceSelect = {
|
export const datasourceSelect = {
|
||||||
table: (table, datasources) => ({
|
table: (table, datasources) => {
|
||||||
label: table.name,
|
const sourceId = table.sourceId || table.datasourceId
|
||||||
tableId: table._id,
|
const datasource = datasources.find(ds => ds._id === sourceId)
|
||||||
type: "table",
|
return {
|
||||||
datasource: datasources.find(
|
label: table.name,
|
||||||
datasource => datasource._id === table.sourceId || table.datasourceId
|
tableId: table._id,
|
||||||
),
|
type: "table",
|
||||||
}),
|
datasourceName: datasource?.name,
|
||||||
|
}
|
||||||
|
},
|
||||||
viewV2: view => ({
|
viewV2: view => ({
|
||||||
...view,
|
...view,
|
||||||
label: view.name,
|
label: view.name,
|
||||||
|
|
Loading…
Reference in New Issue