File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
assets/reactjs/src/blocks/accordion Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ class AccordionBlock extends Component {
6565 } ,
6666 } = this . props ;
6767
68+ if ( ! uniqueId ) setAttributes ( { uniqueId : clientId . substr ( 0 , 6 ) } )
69+
6870 return (
6971 < Fragment >
7072 < InspectorControls >
@@ -85,7 +87,7 @@ class AccordionBlock extends Component {
8587 setAttributes
8688 } ) }
8789
88- < div className = { `qubely-block-accordion qubely-block-${ clientId } ${ className ? ` ${ className } ` : "" } ` } >
90+ < div className = { `qubely-block-accordion qubely-block-${ uniqueId } ${ className ? ` ${ className } ` : "" } ` } >
8991 < InnerBlocks
9092 template = { this . getAccordionTemplate ( attributes ) }
9193 allowedBlocks = { [ "qubely/accordion-item" ] }
Original file line number Diff line number Diff line change 55} = wp . qubelyComponents ;
66class Save extends Component {
77 render ( ) {
8- const { clientId, attributes } = this . props ;
9- const { animation, uniqueId, itemToggle, interaction } = attributes ;
8+ const { animation, uniqueId, itemToggle, interaction } = this . props . attributes ;
109 const interactionClass = IsInteraction ( interaction ) ? "qubley-block-interaction" : "" ;
11- const className = `qubely-block-accordion ${ interactionClass } qubely-block-${ clientId } ` ;
10+ const className = `qubely-block-accordion ${ interactionClass } qubely-block-${ uniqueId } ` ;
1211 return (
1312 < div className = { className } { ...animationAttr ( animation ) } data-item-toggle = { itemToggle } >
1413 < InnerBlocks . Content />
You can’t perform that action at this time.
0 commit comments