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: ui.radio value defaulting #818

Merged
merged 6 commits into from
Sep 21, 2024

Conversation

AkshatJawne
Copy link
Contributor

@AkshatJawne AkshatJawne commented Sep 11, 2024

Closes #765

@AkshatJawne AkshatJawne requested a review from mofojed September 11, 2024 15:54
@AkshatJawne AkshatJawne self-assigned this Sep 11, 2024
@AkshatJawne
Copy link
Contributor Author

Investigating failures

return (
<DHRadio
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
value={value as string}
Copy link
Member

Choose a reason for hiding this comment

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

You need to pass children down to DHRadio as well, as you've pulled it out of props. That's why your e2e tests are failing.
Run the script from the ticket and you'll see the issue.

Copy link
Member

Choose a reason for hiding this comment

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

You shouldn't need as string, value is already a string by this point.

@AkshatJawne AkshatJawne requested a review from mofojed September 18, 2024 19:39
return (
<DHRadio
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
value={value as string}
Copy link
Member

Choose a reason for hiding this comment

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

You shouldn't need as string, value is already a string by this point.

plugins/ui/src/js/src/elements/Radio.tsx Outdated Show resolved Hide resolved
@AkshatJawne AkshatJawne requested a review from mofojed September 18, 2024 20:51
@mofojed
Copy link
Member

mofojed commented Sep 18, 2024

@AkshatJawne to fix the tests I think you just need to merge in the latest main.

@AkshatJawne
Copy link
Contributor Author

@mofojed Appears that merging main did not change it, will investigate further

@AkshatJawne AkshatJawne merged commit 5581ae4 into deephaven:main Sep 21, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui.radio does not have value prop default to label
2 participants