Replaced deprecataed instance of currentAsset with selectedScreen

This commit is contained in:
Dean 2024-02-14 10:26:35 +00:00
parent 4d225b6d7f
commit 328b8ced44
1 changed files with 5 additions and 4 deletions

View File

@ -1,18 +1,19 @@
<script> <script>
import { Label, Select, Body } from "@budibase/bbui" import { Label, Select, Body } from "@budibase/bbui"
import { findAllMatchingComponents } from "helpers/components" import { findAllMatchingComponents } from "helpers/components"
import { currentAsset } from "builderStore" import { selectedScreen } from "stores/builder"
export let parameters export let parameters
$: tables = findAllMatchingComponents($currentAsset?.props, component => $: tables = findAllMatchingComponents($selectedScreen?.props, component =>
component._component.endsWith("table") component._component.endsWith("table")
).map(table => ({ ).map(table => ({
label: table._instanceName, label: table._instanceName,
value: table._id, value: table._id,
})) }))
$: tableBlocks = findAllMatchingComponents($currentAsset?.props, component => $: tableBlocks = findAllMatchingComponents(
component._component.endsWith("tableblock") $selectedScreen?.props,
component => component._component.endsWith("tableblock")
).map(block => ({ ).map(block => ({
label: block._instanceName, label: block._instanceName,
value: `${block._id}-table`, value: `${block._id}-table`,