mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
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:
parent
67a8e97805
commit
df090e89f7
6
.changeset/stale-lizards-cut.md
Normal file
6
.changeset/stale-lizards-cut.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/checkbox": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Fix Checkbox select dispatch
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user