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

format currency to all caps AssetContainer #37

Closed
skorphil opened this issue Feb 20, 2024 · 3 comments · Fixed by #60
Closed

format currency to all caps AssetContainer #37

skorphil opened this issue Feb 20, 2024 · 3 comments · Fixed by #60
Assignees
Labels
enhancement New feature or request

Comments

@skorphil
Copy link
Owner

No description provided.

@skorphil skorphil self-assigned this Feb 20, 2024
@skorphil skorphil added the enhancement New feature or request label Feb 20, 2024
@skorphil
Copy link
Owner Author

Some native features of use-hook-form: https://react-hook-form.com/advanced-usage#TransformandParse

@skorphil
Copy link
Owner Author

Working method

const formatCurrency = (assetName, event) => {
    const modifiedValue = event.target.value.toUpperCase();
    setValue(`${assetName}.currency`, modifiedValue);
  };
<Input
        {...register(`${assetName}.currency`)}
        onChange={(e) => formatCurrency(assetName, e)}

@skorphil skorphil linked a pull request Mar 2, 2024 that will close this issue
@skorphil skorphil closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
@skorphil skorphil reopened this Mar 2, 2024
@skorphil
Copy link
Owner Author

skorphil commented Mar 2, 2024

@skorphil skorphil closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant