Skip to content

Commit

Permalink
Fix unexpected rendering of Dataset (#8987)
Browse files Browse the repository at this point in the history
* Fix unexpected rendering of Dataset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent 54da6da commit 7b288cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/violet-eyes-stand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/dataset": patch
"gradio": patch
---

fix:Fix unexpected rendering of Dataset
6 changes: 5 additions & 1 deletion js/dataset/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
}
$: {
samples = sample_labels ? sample_labels.map((e) => [e]) : samples || [];
if (sample_labels) {
samples = sample_labels.map((e) => [e]);
} else if (!samples) {
samples = [];
}
paginate = samples.length > samples_per_page;
if (paginate) {
visible_pages = [];
Expand Down

0 comments on commit 7b288cf

Please sign in to comment.