-
Notifications
You must be signed in to change notification settings - Fork 352
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
bug(ClipboardCopy): change children type to string #9743
Changes from all commits
2851150
fed5a90
692562f
cb18398
02ea887
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ import { PickOptional } from '../../helpers/typeUtils'; | |
|
||
export interface ClipboardCopyExpandedProps extends Omit<ClipboardCopyProps, 'onChange'> { | ||
className?: string; | ||
children: React.ReactNode; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you mean to remove this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep - it matches ClilpboardCopyProps now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the type is changing , we can remove the array logic. However I wonder if this would break people who using the component like mentioned in the issue that resulted in adding array logic. #6863 |
||
onChange?: (e: React.FormEvent<HTMLDivElement>, text: string) => void; | ||
isReadOnly?: boolean; | ||
isCode?: boolean; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want to update the onCopy and clipboardCopyFunc params so that
text
isstring | number
similar to the onChange prop while we're at it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, although maybe just make it always
string
? The value from a input will always be string anyway