Set tab order based on block's order
This commit is contained in:
parent
97dc41e2aa
commit
4605f7ee57
|
@ -26,7 +26,12 @@ export function Edit( {
|
|||
context,
|
||||
}: ProductEditorBlockEditProps< TabBlockAttributes > ) {
|
||||
const blockProps = useWooBlockProps( attributes );
|
||||
const { id, title, order, isSelected: contextIsSelected } = attributes;
|
||||
const {
|
||||
id,
|
||||
title,
|
||||
_templateBlockOrder: order,
|
||||
isSelected: contextIsSelected,
|
||||
} = attributes;
|
||||
const isSelected = context.selectedTab === id;
|
||||
if ( isSelected !== contextIsSelected ) {
|
||||
setAttributes( { isSelected } );
|
||||
|
|
Loading…
Reference in New Issue