diff --git a/blocks/oik-blocklist/blocklist.js b/blocks/oik-blocklist/blocklist.js index 6cb476f..19557e6 100644 --- a/blocks/oik-blocklist/blocklist.js +++ b/blocks/oik-blocklist/blocklist.js @@ -8,6 +8,7 @@ const { getBlockType, getBlockTypes } = wp.blocks; const { BlockIcon } = wp.editor; +const Fragment = wp.element.Fragment; import { BlockiconStyled } from '../oik-blockicon/blockicons.js'; import { getNameSpace} from './blockprefix.js'; @@ -24,12 +25,14 @@ function BlockListStyled( prefix, showBlockTypeName, showTitle, showDescription, var block_types = getBlockTypes(); block_types = block_types.filter( namespaceFilter, namespace ); + //block_types = block_types.sortByField( "name"); + block_types = block_types.sort( (a, b) => a.title.localeCompare(b.title)); //console.log( block_types ); return( -