react-joyride icon indicating copy to clipboard operation
react-joyride copied to clipboard

Can't use React component in tooltip text, only in steps

Open michaelntech opened this issue 9 years ago • 5 comments

Using 1.10.1. I can use a React component as the text value of a step, but not as a single tooltip using addTooltip method.

In browser console I see Uncaught Error: Objects are not valid as a React child

michaelntech avatar Sep 06 '17 14:09 michaelntech

Can you please post an example?

gilbarbara avatar Nov 01 '17 15:11 gilbarbara

I've (probably) ran into same problem. Error message from console is: Invariant Violation: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner}).

I'm using 1.10.1 on React ^16.1.0. I'm getting this error only on IE11 (Win 8.1).

vkoudela avatar Dec 01 '17 13:12 vkoudela

I've the same problem. I define steps like this

{
 title: '',
 text: (
  <div>
   Some text
   <ul>
    <li>Some text</li>
    <li>Some text</li>
   </ul>
   Some text
  </div>
 ),
 selector: 'div.searchbar',
 position: 'right',
 trigger: 'div.searchbar .helpIcon img',
}

and add it via api like this

 this.joyride.addTooltip(item)

I'm using 1.11.* on React 15.4.*

jschendzielorz avatar Dec 12 '17 15:12 jschendzielorz

Here's a codesandbox-project that shows the problem:

https://codesandbox.io/s/xly3kwml3o

(The styling and stuff are not imported correctly but don't mind that)

stillesjo avatar Jan 12 '18 09:01 stillesjo

Hey,

yeah, it's known limitation that I'll address in V2 but I'll remove standalone tooltips in favor of react-tooltips. Can you please try it?

gilbarbara avatar Jan 12 '18 11:01 gilbarbara