diff --git a/.changeset/thick-teams-attend.md b/.changeset/thick-teams-attend.md new file mode 100644 index 0000000000..64729426f9 --- /dev/null +++ b/.changeset/thick-teams-attend.md @@ -0,0 +1,6 @@ +--- +"@gradio/highlightedtext": patch +"gradio": patch +--- + +fix:Ensure `show_label` param is used in HighlightedText diff --git a/js/highlightedtext/Index.svelte b/js/highlightedtext/Index.svelte index ed153d61f7..6a1ba63de5 100644 --- a/js/highlightedtext/Index.svelte +++ b/js/highlightedtext/Index.svelte @@ -36,6 +36,7 @@ export let _selectable = false; export let combine_adjacent = false; export let interactive: boolean; + export let show_label = true; $: if (!color_map && Object.keys(color_map).length) { color_map = color_map; @@ -73,12 +74,13 @@ {...loading_status} on:clear_status={() => gradio.dispatch("clear_status", loading_status)} /> - {#if label} + {#if label && show_label} {/if} @@ -115,12 +117,13 @@ i18n={gradio.i18n} on:clear_status={() => gradio.dispatch("clear_status", loading_status)} /> - {#if label} + {#if label && show_label} {/if} @@ -133,7 +136,7 @@ {color_map} /> {:else} - + {/if}