Skip to content

Commit

Permalink
Fix #5757: Accordion error reading disabled (#5758)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 12, 2024
1 parent 2ea2528 commit 9b51ab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export const Accordion = React.forwardRef((inProps, ref) => {

useHandleStyle(AccordionBase.css.styles, isUnstyled, { name: 'accordion' });

const getTabProp = (tab, name) => AccordionTabBase.getCProp(tab, name);

const getTabPT = (tab, key, index) => {
const atProps = AccordionTabBase.getCProps(tab);
const tabMetaData = {
Expand All @@ -48,11 +50,9 @@ export const Accordion = React.forwardRef((inProps, ref) => {
}
};

return mergeProps(ptm(`accordion.${key}`, { tab: tabMetaData }), ptm(`tab.${key}`, { accordiontab: tabMetaData }), ptm(`tab.${key}`, tabMetaData), ptmo(getTabProp(tab, 'pt'), key, tabMetaData));
return mergeProps(ptm(`tab.${key}`, { tab: tabMetaData }), ptm(`tab.${key}`, { accordiontab: tabMetaData }), ptm(`tab.${key}`, tabMetaData), ptmo(getTabProp(tab, 'pt'), key, tabMetaData));
};

const getTabProp = (tab, name) => AccordionTabBase.getCProp(tab, name);

const onTabHeaderClick = (event, tab, index) => {
changeActiveIndex(event, tab, index);
};
Expand Down

0 comments on commit 9b51ab2

Please sign in to comment.