Merge branch 'master' of github.com:Budibase/budibase into dependabot/npm_and_yarn/elliptic-6.5.7

This commit is contained in:
mike12345567 2024-08-21 10:04:25 +01:00
commit 2774d30e1c
2 changed files with 11 additions and 9 deletions

View File

@ -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"

View File

@ -1,12 +1,14 @@
export const datasourceSelect = {
table: (table, datasources) => ({
label: table.name,
tableId: table._id,
type: "table",
datasource: datasources.find(
datasource => datasource._id === table.sourceId || table.datasourceId
),
}),
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",
datasourceName: datasource?.name,
}
},
viewV2: view => ({
...view,
label: view.name,