Skip to content

Commit

Permalink
fix(frontend): Allow AppSelectTab (#1787)
Browse files Browse the repository at this point in the history
* fix(frontend): Allow AppSelectTab

* fix(frontend): Fix default value

* fix(frontend): Fix default value
  • Loading branch information
fatonramadani committed Jul 3, 2023
1 parent ea04e90 commit 080e244
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,15 @@
function setDefaultValue() {
if (resolvedConfig.defaultValue === undefined) {
selected = resolvedConfig.items[0].value
} else if (resolvedConfig.defaultValue?.value) {
selected = resolvedConfig.defaultValue?.value
} else if (resolvedConfig.defaultValue) {
selected = resolvedConfig.defaultValue
}
}
function handleSelection(value: string) {
outputs?.result.set(value)
}
function onPointerDown(
e: PointerEvent & {
currentTarget: EventTarget & HTMLDivElement
}
) {
if (!e.shiftKey) {
e.stopPropagation()
}
}
$: selected && handleSelection(selected)
$: css = concatCustomCss($app.css?.selecttabcomponent, customCss)
</script>
Expand All @@ -77,7 +67,7 @@
<InitializeComponent {id} />

<AlignWrapper {render} {horizontalAlignment} {verticalAlignment}>
<div class="w-full" on:pointerdown={onPointerDown}>
<div class="w-full">
<Tabs bind:selected class={css?.tabRow?.class} style={css?.tabRow?.style}>
{#each resolvedConfig?.items ?? [] as item}
<Tab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,7 @@ Hello \${ctx.username}

defaultValue: {
type: 'static',
value: undefined as { value: string; label: string } | undefined,
value: undefined,
fieldType: 'object'
},
tabSize: {
Expand Down

0 comments on commit 080e244

Please sign in to comment.