Skip to content

Commit

Permalink
chore: show copy button if label is not defined #2025
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-mihok authored and mturoci committed Sep 6, 2023
1 parent d26a5ef commit 76120e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/copyable_text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ export const XCopyableText = ({ model }: { model: CopyableText }) => {
heightStyle = multiline && height === '1' ? fullHeightStyle : undefined,
[inputEl, setInputEl] = React.useState(),
domRef = React.useCallback(node => {
const inputEl = node?.children[0]?.children[label ? 1 : 0]
const inputEl = node?.children[0]?.children[1]
if (inputEl) setInputEl(inputEl)
}, [label])
}, [])

return (
<Fluent.TextField
Expand Down

0 comments on commit 76120e9

Please sign in to comment.