Fix Checkbox select dispatch (#5340)

* Fix bug

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Freddy Boulton 2023-08-25 11:42:46 -04:00 committed by GitHub
parent 67a8e97805
commit df090e89f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/checkbox": patch
"gradio": patch
---
fix:Fix Checkbox select dispatch

View File

@ -4,6 +4,7 @@
import { Block, Info } from "@gradio/atoms";
import { StatusTracker } from "@gradio/statustracker";
import type { LoadingStatus } from "@gradio/statustracker";
import type { SelectData } from "@gradio/utils";
import { _ } from "svelte-i18n";
export let elem_id = "";
@ -19,7 +20,7 @@
export let loading_status: LoadingStatus;
export let gradio: Gradio<{
change: never;
select: never;
select: SelectData;
input: never;
}>;
</script>
@ -36,6 +37,6 @@
bind:value_is_output
on:change={() => gradio.dispatch("change")}
on:input={() => gradio.dispatch("input")}
on:select={() => gradio.dispatch("select")}
on:select={(e) => gradio.dispatch("select", e.detail)}
/>
</Block>

View File

@ -4,6 +4,7 @@
import { Block, Info } from "@gradio/atoms";
import { StatusTracker } from "@gradio/statustracker";
import type { LoadingStatus } from "@gradio/statustracker";
import type { SelectData } from "@gradio/utils";
export let elem_id = "";
export let elem_classes: string[] = [];
@ -18,7 +19,7 @@
export let loading_status: LoadingStatus;
export let gradio: Gradio<{
change: never;
select: never;
select: SelectData;
input: never;
}>;
</script>
@ -35,7 +36,7 @@
bind:value_is_output
on:change={() => gradio.dispatch("change")}
on:input={() => gradio.dispatch("input")}
on:select={() => gradio.dispatch("select")}
on:select={(e) => gradio.dispatch("select", e.detail)}
disabled
/>
</Block>