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(admin): Price input #4530

Merged
merged 3 commits into from
Jul 14, 2023
Merged

fix(admin): Price input #4530

merged 3 commits into from
Jul 14, 2023

Conversation

pKorsholm
Copy link
Contributor

@pKorsholm pKorsholm commented Jul 13, 2023

What

  • set number input values to 0 instead of undefined

Why

  • setting RHF value to undefined when using a Controller component is undefined behavior (which in this case resets the input to default value), setting value to null is defined

(docs: https://react-hook-form.com/docs/usecontroller/controller)

Fixes CORE-1408

@changeset-bot
Copy link

changeset-bot bot commented Jul 13, 2023

🦋 Changeset detected

Latest commit: 7cb0cdc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/admin-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 13, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
medusa-docs ⬜️ Ignored (Inspect) Jul 13, 2023 9:00am

@pKorsholm pKorsholm marked this pull request as ready for review July 13, 2023 09:02
@pKorsholm pKorsholm requested a review from a team as a code owner July 13, 2023 09:02
@olivermrbl olivermrbl changed the title Fix/number inputs fix(admin): Number input Jul 14, 2023
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM!

@olivermrbl olivermrbl changed the title fix(admin): Number input fix(admin): Price input Jul 14, 2023
@olivermrbl olivermrbl merged commit 55db914 into develop Jul 14, 2023
@olivermrbl olivermrbl deleted the fix/number-inputs branch July 14, 2023 08:45
This was referenced Jul 14, 2023
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.

2 participants