ensure gr.Dataframe updates as expected (#6290)

* ensure Dataframe updates as expected

* add changeset

* add changeset

* ensure Dataframe updates as expected

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
pngwn 2023-11-03 22:33:19 +00:00 committed by GitHub
parent 5668036eef
commit e8216be948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 4 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/dataframe": patch
"gradio": patch
---
fix:ensure `gr.Dataframe` updates as expected

View File

@ -1 +1 @@
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: dataframe_component"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr \n", "\n", "with gr.Blocks() as demo:\n", " gr.Dataframe(interactive=True)\n", "\n", "demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: dataframe_component"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "with gr.Blocks() as demo:\n", " gr.Dataframe(interactive=True)\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}

View File

@ -1,6 +1,6 @@
import gradio as gr
import gradio as gr
with gr.Blocks() as demo:
gr.Dataframe(interactive=True)
demo.launch()
demo.launch()

View File

@ -99,6 +99,7 @@
{col_count}
{value}
{headers}
on:change={(e) => (value = e.detail)}
on:select={(e) => gradio.dispatch("select", e.detail)}
{wrap}
{datatype}

View File

@ -44,7 +44,7 @@
function handle_blur({
currentTarget
}: {
}: Event & {
currentTarget: HTMLInputElement;
}): void {
value = currentTarget.value;