fix select in table default value

This commit is contained in:
Ruben Fiszel
2024-01-24 23:49:54 +01:00
parent 737c4fb497
commit c79a82d188
4 changed files with 10 additions and 3 deletions
@@ -585,6 +585,7 @@
{:else if actionButton.type == 'selectcomponent'}
<div class="w-40">
<AppSelect
noDefault
noInitialize
extraKey={'idx' + rowIndex}
{render}
@@ -631,6 +632,7 @@
{:else if actionButton.type == 'selectcomponent'}
<div class="w-40">
<AppSelect
noDefault
noInitialize
--font-size="10px"
extraKey={'idx' + rowIndex}
@@ -33,6 +33,7 @@
export let noInitialize = false
export let controls: { left: () => boolean; right: () => boolean | string } | undefined =
undefined
export let noDefault = false
const {
app,
@@ -68,7 +69,7 @@
result: undefined as string | undefined
})
let value: string | undefined = outputs?.result.peak()
let value: string | undefined = noDefault ? undefined : outputs?.result.peak()
$: resolvedConfig.items && handleItems()
@@ -47,7 +47,7 @@
<div
class={classNames(
'w-full text-xs font-bold gap-1 truncate py-1.5 px-2 cursor-pointer transition-all justify-between flex items-center border border-gray-3 rounded-md',
'bg-surface border-gray-300 hover:bg-gray-100 focus:bg-gray-100 text-secondary',
'bg-surface hover:bg-tertiary focus:border-primary text-secondary',
$selectedComponent?.includes(component.id) ? 'outline outline-blue-500 bg-red-400' : ''
)}
on:click={() => {
+5 -1
View File
@@ -173,7 +173,11 @@ export type ListContext = Writable<{
disabled: boolean
}>
export type ListInputs = { set: (id: string, value: any) => void; remove: (id: string) => void }
export type ListInputs = {
set: (id: string, value: any) => void
remove: (id: string) => void
get: (id: string) => void
}
export type GroupContext = Writable<Record<string, any>>