Skip to content

Commit

Permalink
fix: made it possible to pass uuid instead of generating one internal…
Browse files Browse the repository at this point in the history
…ly (ReactTooltip#583)

When passing the `uuid` prop ReactTooltip will not generate one itself so you can have a predictable
ID when using SSR strategies"

fix ReactTooltip#580
  • Loading branch information
RamonGebben authored Apr 19, 2020
1 parent e518600 commit 083edfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ReactTooltip extends React.Component {
super(props);

this.state = {
uuid: generateUUID(),
uuid: props.uuid || generateUUID(),
place: props.place || "top", // Direction of tooltip
desiredPlace: props.place || "top",
type: "dark", // Color theme of tooltip
Expand Down

0 comments on commit 083edfb

Please sign in to comment.