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

Input field on the left, currency icon on the right #29

Open
averholantsev opened this issue Jun 18, 2020 · 1 comment
Open

Input field on the left, currency icon on the right #29

averholantsev opened this issue Jun 18, 2020 · 1 comment

Comments

@averholantsev
Copy link

Hi, I couldn't find any good solution to reverse order of Input field and currency icon.
I need that possibility, due to other fields of material ui looks different, and their Input field on the left.

How can I change Input field on the left, currency icon on the right?
Example:
image

@keemor
Copy link

keemor commented Jun 25, 2020

@averholantsev I had a similar problem and I ended up integrating react-number-format with texfield

Here is an example with react-hook-form:

https://codesandbox.io/s/react-hook-form-number-format-custom-integration-2i82q

<NumberFormat
  customInput={TextField}
  decimalSeparator=","
  thousandSeparator=" "
  decimalScale={2}
  autoComplete="off"
  InputProps={{
	endAdornment: (
	  <InputAdornment position="start">USD</InputAdornment>
	)
  }}
/>

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

No branches or pull requests

2 participants