Skip to content

Commit 0079071

Browse files
committed
fix onSelect and onChange are both wired to handleSelect, causing it to be called twice per user selection.
1 parent affe37f commit 0079071

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

src/lib/components/domains/recordTable.svelte

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,14 @@
140140
{#if variant === 'cname' && !subdomain}
141141
{#if isCloud}
142142
<Alert.Inline>
143-
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain,
144-
CNAME record is only supported by certain providers. If yours doesn't, please verify
145-
using
143+
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain, CNAME
144+
record is only supported by certain providers. If yours doesn't, please verify using
146145
<Link variant="muted" on:click={onNavigateToNameservers}>nameservers</Link> instead.
147146
</Alert.Inline>
148147
{:else if aTabVisible || aaaaTabVisible}
149148
<Alert.Inline>
150-
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain,
151-
CNAME record is only supported by certain providers. If yours doesn't, please verify
152-
using
149+
Since <Badge variant="secondary" size="s" content={domain} /> is an apex domain, CNAME
150+
record is only supported by certain providers. If yours doesn't, please verify using
153151
{#if aTabVisible}
154152
<Link variant="muted" on:click={onNavigateToA}>A record</Link>
155153
{#if aaaaTabVisible}

src/lib/components/git/selectRootModal.svelte

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,8 @@
376376
}
377377
});
378378
379-
async function handleSelect(detail: { fullPath: string }) {
380-
const path = detail.fullPath as string;
381-
currentPath = path;
382-
loadPath(path);
379+
function handleSelect(detail: { fullPath: string }) {
380+
loadPath(detail.fullPath);
383381
}
384382
385383
function handleSubmit() {
@@ -398,8 +396,7 @@
398396
expanded={expandedStore}
399397
bind:selected={currentPath}
400398
openTo={initialPath}
401-
onSelect={handleSelect}
402-
onChange={handleSelect} />
399+
onSelect={handleSelect} />
403400

404401
<svelte:fragment slot="footer">
405402
<Button secondary on:click={() => (show = false)}>Cancel</Button>

0 commit comments

Comments
 (0)