From d3e6e511db6bbdf78882aec10e20ac497037089e Mon Sep 17 00:00:00 2001 From: Ramon Gebben Date: Fri, 17 Apr 2020 10:34:44 +0200 Subject: [PATCH] fix: made it possible to pass uuid instead of generating one internally 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