Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset textbox value to empty string when value is None #5114

Merged
merged 2 commits into from Aug 8, 2023

Conversation

hannahblair
Copy link
Collaborator

Description

When the textbox value is cleared, it's set to None on the backend. When the value is set to None in the backend, this PR adds a func set it to "" in the frontend.

Closes: #5103

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

@vercel
Copy link

vercel bot commented Aug 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
gradio ✅ Ready (Inspect) Visit Preview Aug 7, 2023 0:43am

@hannahblair hannahblair changed the title Reset textbox value to empty string when null Reset textbox value to empty string when None Aug 7, 2023
@hannahblair hannahblair changed the title Reset textbox value to empty string when None Reset textbox value to empty string when value is None Aug 7, 2023
@hannahblair hannahblair added the no-visual-update Add this to a PR to skip chromatic deployment and tests label Aug 7, 2023
@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Aug 7, 2023

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/textbox patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Reset textbox value to empty string when value is None

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Aug 7, 2023

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-5114-all-demos


You can install the changes in this PR by running:

pip install https://gradio-builds.s3.amazonaws.com/efec49f6d6e0248539d51ed9b12b0bea12b23c28/gradio-3.39.0-py3-none-any.whl

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix @hannahblair !

@freddyaboulton freddyaboulton merged commit 56d2609 into main Aug 8, 2023
9 checks passed
@freddyaboulton freddyaboulton deleted the fix-null-textbox branch August 8, 2023 18:53
@pngwn pngwn mentioned this pull request Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-visual-update Add this to a PR to skip chromatic deployment and tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clearing a textbox will set its value to None, not ""
3 participants