Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #388 from deriv-com/fixed-accordion-id
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv authored Mar 6, 2024
2 parents 62eb199 + beed1b1 commit 0b0336b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/blocks/src/lib/accordion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ export function AccordionBlock({
<div className={content?.className}>
{content &&
content.data[selectedChip].map((accData) => {
const { title: accTitle } = accData;
const id = slugify(accTitle as string);
const { title: accTitle, id } = accData;
const dataId = id || slugify(accTitle as string);

return (
<DynamicAccordion
{...accData}
id={id}
id={dataId}
key={accTitle}
expanded={multiCollapse ? false : expanded === accTitle}
onExpand={(isExpanded, id) => handleExpand(isExpanded, id)}
Expand Down

0 comments on commit 0b0336b

Please sign in to comment.