From 083edfb91d532d5880562c0510845081ef7463b0 Mon Sep 17 00:00:00 2001 From: Ramon Gebben Date: Sun, 19 Apr 2020 02:28:07 +0200 Subject: [PATCH] fix: made it possible to pass uuid instead of generating one internally (#583) When passing the `uuid` prop ReactTooltip will not generate one itself so you can have a predictable ID when using SSR strategies" fix #580 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ea0c444ee..9790198f6 100755 --- a/src/index.js +++ b/src/index.js @@ -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