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

fix: add null type to allowable target onchange #2190

Closed
wants to merge 1 commit into from

Conversation

jordanrfrazier
Copy link
Collaborator

Preface: I don't know javascript.

For typed fields from the UI, when you entered a value then removed it, it would act as an empty string rather than reset to null. For many fields, this is an invalid type, causing errors on build.

This PR adds the null type to the allowed onchange events, which is interpreted as the correct None in python backend. Note this does mean that an empty string is no longer accepted as a valid input, but that seems okay. If this is the correct fix, I'll replicate on the other typed fields.

Copy link

vercel bot commented Jun 16, 2024

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

Name Status Preview Comments Updated (UTC)
langflow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2024 5:41am

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. javascript Pull requests that update Javascript code labels Jun 16, 2024
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

I agree with this change.
@anovazzi1 do you agree as well?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 16, 2024
@anovazzi1
Copy link
Contributor

I agree too.

@jordanrfrazier
Copy link
Collaborator Author

Sounds good. I'll update the rest of the types and ping when it's ready for another look. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants