Skip to content

Commit

Permalink
Fix data attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadkarmalkar committed Dec 26, 2024
1 parent 1cb3493 commit a160236
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/table/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"alignAllColumns": {
"type": "string",
"source": "attribute",
"selector": "table",
"attribute": "data-align-all-columns"
},
"head": {
Expand Down
4 changes: 1 addition & 3 deletions packages/block-library/src/table/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ export default function save( { attributes } ) {
: undefined
}
data-align={ align }
data-align-all-columns={
attributes.alignAllColumns
}
tagName={ tag }
value={ content }
key={ cellIndex }
Expand All @@ -95,6 +92,7 @@ export default function save( { attributes } ) {
<table
className={ classes === '' ? undefined : classes }
style={ { ...colorProps.style, ...borderProps.style } }
data-align-all-columns={ attributes.alignAllColumns }
>
<Section type="head" rows={ head } />
<Section type="body" rows={ body } />
Expand Down

0 comments on commit a160236

Please sign in to comment.