diff options
Diffstat (limited to 'src/components/ui/Tabs')
-rw-r--r-- | src/components/ui/Tabs/Tabs.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/ui/Tabs/Tabs.tsx b/src/components/ui/Tabs/Tabs.tsx index a5ec148aa..d1e397122 100644 --- a/src/components/ui/Tabs/Tabs.tsx +++ b/src/components/ui/Tabs/Tabs.tsx | |||
@@ -35,6 +35,7 @@ class Tab extends Component<IProps, IState> { | |||
35 | 35 | ||
36 | render(): ReactElement { | 36 | render(): ReactElement { |
37 | const { children: childElements } = this.props; | 37 | const { children: childElements } = this.props; |
38 | // eslint-disable-next-line @eslint-react/no-children-to-array | ||
38 | const children = Children.toArray(childElements); // removes all null values | 39 | const children = Children.toArray(childElements); // removes all null values |
39 | 40 | ||
40 | if (children.length === 1) { | 41 | if (children.length === 1) { |
@@ -44,9 +45,10 @@ class Tab extends Component<IProps, IState> { | |||
44 | return ( | 45 | return ( |
45 | <div className="content-tabs"> | 46 | <div className="content-tabs"> |
46 | <div className="content-tabs__tabs"> | 47 | <div className="content-tabs__tabs"> |
48 | {/* eslint-disable-next-line @eslint-react/no-children-map */} | ||
47 | {Children.map(children, (child, i) => ( | 49 | {Children.map(children, (child, i) => ( |
48 | <button | 50 | <button |
49 | // eslint-disable-next-line react/no-array-index-key | 51 | // eslint-disable-next-line react/no-array-index-key, @eslint-react/no-array-index-key |
50 | key={i} | 52 | key={i} |
51 | className={classnames({ | 53 | className={classnames({ |
52 | 'content-tabs__item': true, | 54 | 'content-tabs__item': true, |
@@ -60,9 +62,10 @@ class Tab extends Component<IProps, IState> { | |||
60 | ))} | 62 | ))} |
61 | </div> | 63 | </div> |
62 | <div className="content-tabs__content"> | 64 | <div className="content-tabs__content"> |
65 | {/* eslint-disable-next-line @eslint-react/no-children-map */} | ||
63 | {Children.map(children, (child, i) => ( | 66 | {Children.map(children, (child, i) => ( |
64 | <div | 67 | <div |
65 | // eslint-disable-next-line react/no-array-index-key | 68 | // eslint-disable-next-line react/no-array-index-key, @eslint-react/no-array-index-key |
66 | key={i} | 69 | key={i} |
67 | className={classnames({ | 70 | className={classnames({ |
68 | 'content-tabs__item': true, | 71 | 'content-tabs__item': true, |