Skip to content

Commit

Permalink
fix: use react-id-generator (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstruebing authored Nov 24, 2022
1 parent adb0c83 commit a2622c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/tabs/components/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { Tabs as ReactTabs, TabList, TabPanel } from "react-tabs";
import { injectGlobal, cx } from "@emotion/css";
import uuid from "uuid";
import nextId from "react-id-generator";
import { TabItemProps } from "./TabItem";
import { TabTitle } from "..";
import {
Expand Down Expand Up @@ -95,7 +95,7 @@ const Tabs = ({
const childrenWithKeys = React.Children.toArray(children).map(
child => {
return React.isValidElement<typeof TabTitle>(child)
? React.cloneElement(child, { key: `${key}-${uuid()}` })
? React.cloneElement(child, { key: nextId("tab") })
: child;
}
);
Expand Down

0 comments on commit a2622c6

Please sign in to comment.