diff --git a/CHANGELOG.md b/CHANGELOG.md index a9f9a7360c..2aee623eba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/js/gallery/src/Gallery.svelte b/js/gallery/src/Gallery.svelte index 4720024843..3bb24c723a 100644 --- a/js/gallery/src/Gallery.svelte +++ b/js/gallery/src/Gallery.svelte @@ -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