-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TextField] InputAdornment shouldn't wrap #15240
Comments
Could you provide a concrete example? I don't think we should support adding "blah blah" as adornments out of the box 😉 |
my case is ",000 Rp" after price |
Hi @eps1lon, I take from your comment that there's a limitation on the length of the adornments? I have the following use case: |
They are really just intended for little adornments. You can probably change the styling to increase the width. Have you tried using The spec has a different solution for units in the form of start/end icons. We can look into implementing those. |
Thanks for your suggestions. Overriding the |
on this page google uses pretty long adorment "@gmail.com" |
It seems that Bootstrap uses the same approach with the prepend: https://getbootstrap.com/docs/4.4/components/forms/#inline-forms. I think that we can move forward with the proposed fix: diff --git a/packages/material-ui/src/InputAdornment/InputAdornment.js b/packages/material-ui/src/InputAdornment/InputAdornment.js
index 6c05f8ab9..6c6149270 100644
--- a/packages/material-ui/src/InputAdornment/InputAdornment.js
+++ b/packages/material-ui/src/InputAdornment/InputAdornment.js
@@ -12,6 +12,7 @@ export const styles = {
height: '0.01em', // Fix IE 11 flexbox alignment. To remove at some point.
maxHeight: '2em',
alignItems: 'center',
+ whiteSpace: 'nowrap',
},
/* Styles applied to the root element if `variant="filled"`. */
filled: { @olistic Do you want to push it further? |
start and end input adormants wraps long lines
Expected Behavior 🤔
start and end input adormants should not wraps long lines
Current Behavior 😯
long lines are wrapped
Steps to Reproduce 🕹
Possible solution
add
Context 🔦
Your Environment 🌎
The text was updated successfully, but these errors were encountered: