Skip to content

Commit

Permalink
fix: πŸ› accordion single expand behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
fukudathais committed Apr 19, 2021
1 parent adbfa71 commit 143ffd7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libs/ui/src/lib/navigation/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ export const Accordion = ({
...rest
}: AccordionProps) => {
const [expanded, setExpanded] = useState<true | false>(initOpened);
const [_expandedPanel, setExpandedPanel] = useState<string | false>(false);

const handleChange = (panel?: string) => (
event: React.ChangeEvent<unknown>,
isExpanded: boolean,
) => {
if (singleExpand) {
setExpandedPanel(isExpanded ? panel : false);
setWhoIsExpanded(panel);
setWhoIsExpanded(isExpanded ? panel : false);
} else {
setExpanded(!expanded);
}
Expand Down

0 comments on commit 143ffd7

Please sign in to comment.