Highlight setting on click

This commit is contained in:
Adria Navarro 2025-02-03 17:59:09 +01:00
parent 20c17f1065
commit f3e617635e
1 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<script lang="ts">
import type { UIComponentError } from "@budibase/types"
import {
builderStore,
componentStore,
screenComponentErrorList,
screenComponents,
@ -17,6 +18,13 @@
}
return titleParts.join(" - ")
}
function onErrorClick(error: UIComponentError) {
componentStore.select(error.componentId)
if (error.errorType === "setting") {
builderStore.highlightSetting(error.key, "error")
}
}
</script>
<div bind:this={button} class="error-button">
@ -40,10 +48,7 @@
color="var(--spectrum-global-color-static-red-600)"
/>
<div>
<Link
overBackground
on:click={() => componentStore.select(error.componentId)}
>
<Link overBackground on:click={() => onErrorClick(error)}>
{getErrorTitle(error)}:</Link
>
<!-- eslint-disable-next-line svelte/no-at-html-tags-->