Skip to content

Commit a189781

Browse files
authored
fix(Clipboard copy): Fixed regression with updating main content when expanded (#9975)
1 parent cec6e41 commit a189781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
252252
<TextInput
253253
readOnlyVariant={isReadOnly || this.state.expanded ? 'default' : undefined}
254254
onChange={this.updateText}
255-
value={this.state.expanded ? this.state.textWhenExpanded : this.state.text}
255+
value={this.state.text}
256256
id={`text-input-${id}`}
257257
aria-label={textAriaLabel}
258258
{...(isCode && { dir: 'ltr' })}
@@ -266,7 +266,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
266266
textId={`text-input-${id}`}
267267
aria-label={hoverTip}
268268
onClick={(event: any) => {
269-
onCopy(event, this.state.expanded ? this.state.textWhenExpanded : this.state.text);
269+
onCopy(event, this.state.text);
270270
this.setState({ copied: true });
271271
}}
272272
onTooltipHidden={() => this.setState({ copied: false })}

0 commit comments

Comments
 (0)