mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix: improve MultiSelectWrapper behavior
This commit is contained in:
@@ -293,7 +293,7 @@
|
||||
tooltip="This event is triggered when the script runs successfully."
|
||||
items={Object.keys($runnableComponents).filter((_id) => _id !== id)}
|
||||
bind:value={
|
||||
() => hiddenInlineScript.script.recomputeIds,
|
||||
() => hiddenInlineScript.script.recomputeIds ?? [],
|
||||
(v) => {
|
||||
if ($app.hiddenInlineScripts[hiddenInlineScript.index]) {
|
||||
$app.hiddenInlineScripts[hiddenInlineScript.index].recomputeIds = v
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
import MultiSelect from '$lib/components/multiselect/MultiSelectWrapper.svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
export let items: string[]
|
||||
export let value: string[] | undefined = undefined
|
||||
export let title: string
|
||||
export let tooltip: string
|
||||
|
||||
let width = 0
|
||||
let { items, value = $bindable(), title, tooltip } = $props<{
|
||||
items: string[]
|
||||
value: string[] | undefined
|
||||
title: string
|
||||
tooltip: string
|
||||
}>()
|
||||
|
||||
let width = $state(0)
|
||||
const inputWidth = 280
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
let {
|
||||
items,
|
||||
value = $bindable([]),
|
||||
value = $bindable(),
|
||||
placeholder = undefined,
|
||||
target = undefined,
|
||||
topPlacement = false,
|
||||
@@ -23,6 +23,8 @@
|
||||
allowUserOptions?: boolean | 'append'
|
||||
}>()
|
||||
|
||||
$effect.pre(() => { if (value === undefined) value = [] })
|
||||
|
||||
const [floatingRef, floatingContent] = createFloatingActions({
|
||||
strategy: 'absolute',
|
||||
placement: topPlacement ? 'top-start' : 'bottom-start',
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
} else {
|
||||
await goto(rd ?? '/')
|
||||
}
|
||||
console.log('Workspace selected, going to', rd)
|
||||
console.log('Workspace selected going to ' + (rd ? `rd: ${rd}` : 'home'))
|
||||
} catch (e) {
|
||||
console.error('Error going to', rd, e)
|
||||
window.location.reload()
|
||||
|
||||
Reference in New Issue
Block a user