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.

Html option (data-html) is not working

See original GitHub issue

Hello there,

I am trying to render an html content for my tooltip using html prop but it is rendering an “object [Object]”.

Even with the commented line.

With a simple text as data-tip it is working correctly.

const Popover = ({ children, content, title, trigger }) => {
  return (
    <>
      {React.cloneElement(children, {
        'data-tip': <p>This is a test</p>,
        'data-for': 'foo',
        // 'data-html': true,
      })}
      <ReactTooltip id="foo" html />
    </>
  );
};

Can anyone help me? Did I miss something?

Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

8reactions
jasur-ncommented, May 25, 2021

@LeoLetourneur @UnumIDAdmin Have you tried to add a multiline prop? In Options list there is a prop’s definition:

image

I hope it will solve yout problem!

2reactions
LeoLetourneurcommented, Jan 28, 2021

Hello,

I have a problem using html=true and <br>. If I use <br>, it displays “[Object, object], [Object, object]”. If I remove it, it’s fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Select option not showing data after selected option
The mistake was at the #state function, I had another part of code which was waiting data for cities once the state was...
Read more >
The HTML Option element - MDN Web Docs - Mozilla
The HTML element is used to define an item contained in a , an , or a element. As such, can represent menu...
Read more >
HTML select disabled Attribute - W3Schools
The disabled attribute is a boolean attribute. When present, it specifies that the drop-down list should be disabled. A disabled drop-down list is...
Read more >
Select not working - options not appearing on click
Hi, I am having trouble with the material select in my application. The element looks as if it is initializing as expected, however...
Read more >
How to set the default value for an HTML <select> element
The select tag in HTML is used to create a dropdown list of options that can be selected. The option tag contains 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