focus input when popover opens

This commit is contained in:
Peter Clement 2023-08-11 12:00:33 +01:00
parent f7c1db5926
commit 6b75a653f8
1 changed files with 7 additions and 10 deletions

View File

@ -96,7 +96,6 @@
} else { } else {
editableColumn.name = "Column 01" editableColumn.name = "Column 01"
} }
focus = true
} }
allowedTypes = getAllowedTypes() allowedTypes = getAllowedTypes()
} }
@ -419,20 +418,18 @@
onMount(() => { onMount(() => {
mounted = true mounted = true
}) })
$: console.log(editableColumn.name)
</script> </script>
<Layout noPadding gap="S"> <Layout noPadding gap="S">
{#if mounted} {#if mounted}
<Input <Input
autofocus autofocus
bind:value={editableColumn.name} bind:value={editableColumn.name}
disabled={uneditable || disabled={uneditable ||
(linkEditDisabled && editableColumn.type === LINK_TYPE)} (linkEditDisabled && editableColumn.type === LINK_TYPE)}
error={errors?.name} error={errors?.name}
/> />
{/if} {/if}
<Select <Select
disabled={!typeEnabled} disabled={!typeEnabled}
bind:value={editableColumn.type} bind:value={editableColumn.type}