question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClipboardCopy adds commas to rendered text

See original GitHub issue
<ClipboardCopy>
    ansible-galaxy install {namespace.name}.
    {name}
</ClipboardCopy>

Adds a bunch of extra commas to the output Screen Shot 2019-09-05 at 8 59 04 AM

It looks like this might be happening because children is an array instead of a string and the component is adding in commas between the items in the array.

Screen Shot 2019-09-05 at 9 00 10 AM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dlabajcommented, Sep 12, 2019

@boaz0 and @newswangerd Having a better example sounds good. I’ll make that change now and include you two on the PR.

1reaction
dlabajcommented, Sep 12, 2019

Hi @newswangerd. Looking at the code this functions as designed, when the array gets converted to a string the commas will come along with it. If you would like to get rid of the commas in the array you will need to remove by doing something like join. For example if name is your array then you could do something like this: name.join(" "). Hope that helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transform Clipboard Contents Between Copy and Paste
This tool provides a solution to the problem of sending results from SQL Server Management Studio to my co-worker, without copy the results ......
Read more >
Inserting a comma into text copied from a website
So, I think you will have to insert any commas using javascript and DOM manipulation. ... classList.add('comma'); comma.
Read more >
w2grid.columns | JavaScript UI - w2ui
The render function will receive two arguments, first is the current record add the second is extra information, which is following object.
Read more >
react-copy-to-clipboard - npm
CopyToClipboard is a simple wrapping component, it does not render any tags, so it requires the only child element to be present, which...
Read more >
Commas and other characters in text and textarea fields
Can anyone assist where users add Commas and other characters in text input ... case my text is split between fields on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found