Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restore type attribute
  • Loading branch information
ellatrix authored and oandregal committed Aug 24, 2022
commit fea69e864bb0eae894238bc096cac01a5e2333cd
3 changes: 2 additions & 1 deletion packages/block-library/src/list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) {
} ),
} );
useMigrateOnLoad( attributes, clientId );
const { ordered, reversed, start } = attributes;
const { ordered, type, reversed, start } = attributes;

const controls = (
<BlockControls group="block">
Expand Down Expand Up @@ -174,6 +174,7 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) {
ordered={ ordered }
reversed={ reversed }
start={ start }
type={ type }
{ ...innerBlocksProps }
/>
{ controls }
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/list/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';

export default function save( { attributes } ) {
const { ordered, reversed, start } = attributes;
const { ordered, type, reversed, start } = attributes;
const TagName = ordered ? 'ol' : 'ul';
return (
<TagName
reversed={ reversed }
start={ start }
{ ...useBlockProps.save() }
{ ...useBlockProps.save( { type, reversed, start } ) }
>
<InnerBlocks.Content />
</TagName>
Expand Down