-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gr.Dropdown
now has correct behavior in static mode as well as when…
… an option is selected (#5062) * dropdown fixes * add changeset * add changeset * guide * guide * stories --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
- Loading branch information
1 parent
f5539c7
commit 7d89716
Showing
4 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@gradio/form": patch | ||
"gradio": patch | ||
--- | ||
|
||
fix:`gr.Dropdown` now has correct behavior in static mode as well as when an option is selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script> | ||
import { Meta, Template, Story } from "@storybook/addon-svelte-csf"; | ||
import Dropdown from "./Dropdown.svelte"; | ||
</script> | ||
|
||
<Meta | ||
title="Components/Dropdown" | ||
component={Dropdown} | ||
argTypes={{ | ||
multiselect: { | ||
control: [true, false], | ||
description: "Whether to autoplay the video on load", | ||
name: "multiselect", | ||
value: false | ||
} | ||
}} | ||
/> | ||
|
||
<Template let:args> | ||
<Dropdown {...args} /> | ||
</Template> | ||
|
||
<Story name="Default" args={{ value:"swim", choices:["run", "swim", "jump"], label:"Dropdown"}} /> | ||
<Story name="Multiselect" args={{ value:["swim", "run"], choices:["run", "swim", "jump"], label:"Multiselect Dropdown", multiselect:true}} /> | ||
<Story name="Multiselect Static" args={{ value:["swim", "run"], choices:["run", "swim", "jump"], label:"Multiselect Dropdown", multiselect:true, disabled:true}} /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7d89716
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gradio – ./
gradio-two.vercel.app
www.gradio.app
gradio-hugging-face.vercel.app
gradio-git-main-hugging-face.vercel.app
gradio.app