Skip to content

Commit

Permalink
Accordion component bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
g-stamatis committed Jan 13, 2022
1 parent b7b2a56 commit 815e91d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/customizations/components/theme/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import React, { useState } from 'react';
import { Accordion, Icon } from 'semantic-ui-react';

export function AccordionEEA({ content, variant, ...args }) {
const [activeIndex, setActiveIndex] = useState(0);
const [activeIndex, setActiveIndex] = useState();

const toggleOpenAccordion = (e, titleProps) => {
const { index } = titleProps;
const newIndex = activeIndex === index ? -1 :index

setActiveIndex(index);
setActiveIndex(newIndex);
};

return (
Expand Down

0 comments on commit 815e91d

Please sign in to comment.