fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

TextField: Support 'add on' on right side of field

Open rickyp-ms opened this issue 9 years ago • 4 comments

When generating email addresses often times (in O365) the email address is always in the domain. To make things easier we would like to have it so the user only has to input the alias.

Our designer gives the following as an example... I'm curious how hard you think it would be to write the css for this and have it be maintainable. I've been thinking on it but could use some second opinions.

emailaddresstextbox

rickyp-ms avatar Jan 11 '17 01:01 rickyp-ms

Couldn't you take the border off the TextField with css, and then render it within a DIV that flexboxes the TextField and the div containing the domain and check glyph?

dzearing avatar Jan 11 '17 20:01 dzearing

Is that still valid for rtl? If I were to make this part of the control, should I call it prefix/suffix? I see the email scenario being used quite a bit and would love to make it easier and consistent across all products. Especially when people generally have to keep writing their domain address when we already know it.

rickyp-ms avatar Jan 17 '17 20:01 rickyp-ms

Looks like someone added an addon for the front. Just need to add a prop to say if the addon should be at the start or end of the textbox and it should be done!

rickyp-ms avatar Aug 04 '17 22:08 rickyp-ms

Please see prefix and suffix props.

gokunymbus avatar Jan 11 '18 19:01 gokunymbus