Skip to content

Commit cfaca9a

Browse files
committed
Update readme to introduce how to use tooltip with modal
1 parent bea6765 commit cfaca9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ Check the example [React-tooltip Test](http://wwayne.com/react-tooltip)
7979
I suggest always put `<ReactTooltip />` in the Highest level or smart component of Redux, so you might need these static
8080
method to control tooltip's behaviour in some situations
8181

82+
## Trouble Shooting
83+
#### Using tooltip within the modal (e.g. [react-modal](https://github.com/reactjs/react-modal))
84+
The component was designed to set a `<Reactooltip />` one place then use tooltip everywhere, but a lot of people stuck in using this component with modal, you can check the discussion [here](https://github.com/wwayne/react-tooltip/issues/130), the summarization of solving the problem is as following:
85+
86+
1. Put `<Reactootlip />` out of the `<Modal>`
87+
2. Use `React.rebuild()` when opening the modal
88+
3. If your modal's z-index happens to higher than the tooltip, use the attribute `class` to custom your tooltip's z-index
89+
8290
## Article
8391
[How I insert sass into react component](https://medium.com/@wwayne_me/how-i-insert-sass-into-my-npm-react-component-b46b9811c226#.gi4hxu44a)
8492

0 commit comments

Comments
 (0)