Skip to content

Commit

Permalink
Merge pull request #2957 from centerofci/2857_default_value_focus
Browse files Browse the repository at this point in the history
Fix default value input stealing focus
  • Loading branch information
rajatvijay committed Jun 26, 2023
2 parents 9ccbb35 + 82aeaee commit 4b8ccff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
</script>

<StringifiedNumberInput
focusOnMount={true}
{...$$restProps}
value={childValue}
{cssVariables}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
</script>

<StringifiedNumberInput
focusOnMount={true}
{...$$restProps}
value={childValue}
{cssVariables}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { takeLast } from 'iter-tools';
import { onMount } from 'svelte';
import { onMount, tick } from 'svelte';
import { writable, type Writable } from 'svelte/store';
import { Button, Icon } from '@mathesar-component-library';
Expand Down Expand Up @@ -129,7 +129,14 @@
</div>
{#if $processedColumns.size}
<div class="footer">
<Button appearance="secondary" on:click={() => addFilter()}>
<Button
appearance="secondary"
on:click={async () => {
addFilter();
await tick();
activateLastFilterInput();
}}
>
<Icon {...iconAddNew} />
<span>Add New Filter</span>
</Button>
Expand Down

0 comments on commit 4b8ccff

Please sign in to comment.