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