mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
Empty gallery fix (#4072)
* changes * changes --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
1871c8eb3c
commit
f763912bc8
@ -6,6 +6,7 @@ No changes to highlight.
|
||||
|
||||
## Bug Fixes:
|
||||
|
||||
- Fix dropdown default value not appearing by [@aliabid94](https://github.com/aliabid94) in [PR 4072](https://github.com/gradio-app/gradio/pull/4072).
|
||||
- Soft theme label color fix by [@aliabid94](https://github.com/aliabid94) in [PR 4070](https://github.com/gradio-app/gradio/pull/4070)
|
||||
|
||||
## Documentation Changes:
|
||||
|
@ -48,7 +48,7 @@
|
||||
// When value is falsy (clear button or first load),
|
||||
// style.preview determines the selected image
|
||||
if (was_reset) {
|
||||
selected_image = style.preview ? 0 : null;
|
||||
selected_image = style.preview && value?.length ? 0 : null;
|
||||
was_reset = false;
|
||||
// Otherwise we keep the selected_image the same if the
|
||||
// gallery has at least as many elements as it did before
|
||||
|
Loading…
Reference in New Issue
Block a user