From 625121473338177d64f51d09bf38027430fd13fc Mon Sep 17 00:00:00 2001 From: Hans Christian Reinl Date: Thu, 3 Dec 2020 11:31:22 +0100 Subject: [PATCH] Tabs: Use index instead of random number for keys --- src/Tabs/index.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Tabs/index.tsx b/src/Tabs/index.tsx index 2f5f1c6..0880e61 100644 --- a/src/Tabs/index.tsx +++ b/src/Tabs/index.tsx @@ -85,11 +85,8 @@ class Tabs extends React.Component { variant={isScrollable ? "scrollable" : undefined} scrollButtons="auto" > - {data.map((item) => ( - + {data.map((item, index) => ( + ))} @@ -97,9 +94,7 @@ class Tabs extends React.Component { {data.map((item, index) => { if (value === index) { return ( - + {item.content} );