-
Notifications
You must be signed in to change notification settings - Fork 356
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
ClipboardCopy - Allow truncate flexibility #10890
Comments
@mattnolting would we need css support for this? |
Would like to note here that in PF5 ClipboardCopy expects children of type React.ReactNode so the above example can be done without any issues. In PF6, ClipboardCopy expects children of type string. It seems to still work when passing the Truncate component but my IDE is upset about it. |
@tlabaj Doesn't appear to need any additional CSS support. 👍 |
ClipboardCopy currently truncates at the end. It may be nice in some cases to truncate at the start or middle (similar to how
Truncate
component works).A workaround could currently work with
inline-compact
with some hacking, see https://codesandbox.io/p/sandbox/red-wind-zdgyqfHowever, this wouldn't work with other variants. They all use
TextInput
, as part of this feature I believeTextInput
would also have to be updated to work with middle truncate (currently it only has start/end).Could use props like
truncatePosition
, andtruncateTrailingNumChars
for middle.This came up in a slack conversation with Vince Consola and @christianvogt
It would also be nice if
inline-compact
supportedtruncate
by itself as well.The text was updated successfully, but these errors were encountered: