fix: copy to clipboard without quotes (#3605)

This commit is contained in:
Rajat Dabade 2023-09-28 09:15:12 +05:30 committed by GitHub
parent 4bbe1ea614
commit 92ba46b2f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,6 +164,8 @@ function TableView({
width: 70, width: 70,
ellipsis: false, ellipsis: false,
render: (field, record): JSX.Element => { render: (field, record): JSX.Element => {
const textToCopy = field.slice(1, -1);
if (record.field === 'body') { if (record.field === 'body') {
const parsedBody = recursiveParseJSON(field); const parsedBody = recursiveParseJSON(field);
if (!isEmpty(parsedBody)) { if (!isEmpty(parsedBody)) {
@ -174,7 +176,7 @@ function TableView({
} }
return ( return (
<CopyClipboardHOC textToCopy={field}> <CopyClipboardHOC textToCopy={textToCopy}>
<span style={{ color: orange[6] }}>{field}</span> <span style={{ color: orange[6] }}>{field}</span>
</CopyClipboardHOC> </CopyClipboardHOC>
); );