improve non selected error message for flow builder

This commit is contained in:
Ruben Fiszel
2023-10-16 11:41:11 +02:00
parent 2431345db4
commit ae99a578cc
2 changed files with 8 additions and 1 deletions
@@ -19,7 +19,7 @@
<script lang="ts">
import PropPicker from '$lib/components/propertyPicker/PropPicker.svelte'
import PropPickerResult from '$lib/components/propertyPicker/PropPickerResult.svelte'
import { clickOutside } from '$lib/utils'
import { clickOutside, sendUserToast } from '$lib/utils'
import { createEventDispatcher, setContext } from 'svelte'
import { Pane, Splitpanes } from 'svelte-splitpanes'
import { writable, type Writable } from 'svelte/store'
@@ -67,6 +67,9 @@
<PropPickerResult
{result}
on:select={({ detail }) => {
if (!$propPickerConfig) {
sendUserToast('Set cursor within an input or click on the plug first', true)
}
dispatch('select', detail)
if ($propPickerConfig?.onSelect(detail)) {
propPickerConfig.set(undefined)
@@ -80,6 +83,9 @@
{pickableProperties}
{notSelectable}
on:select={({ detail }) => {
if (!$propPickerConfig) {
sendUserToast('Set cursor within an input or click on the plug first', true)
}
dispatch('select', detail)
if ($propPickerConfig?.onSelect(detail)) {
propPickerConfig.set(undefined)
@@ -83,6 +83,7 @@
level={level + 1}
currentPath={computeKey(key, isArray, currentPath)}
{pureViewer}
{allowCopy}
on:select
/>
{:else}