{ __( 'No saved blocks.' ) }
@@ -290,16 +289,16 @@ export class InserterMenu extends Component {
);
}
- const visibleBlocksByCategory = this.getVisibleBlocksByCategory( blocksForTab );
+ const visibleItemsByCategory = this.getVisibleItemsByCategory( itemsForTab );
- // If our results have only blocks from one category, don't render category headers
- const categories = Object.keys( visibleBlocksByCategory );
+ // If our results have only items from one category, don't render category headers
+ const categories = Object.keys( visibleItemsByCategory );
if ( categories.length === 1 ) {
const [ soleCategory ] = categories;
- return this.renderBlocks( visibleBlocksByCategory[ soleCategory ] );
+ return this.renderItems( visibleItemsByCategory[ soleCategory ] );
}
- return this.renderCategories( visibleBlocksByCategory );
+ return this.renderCategories( visibleItemsByCategory );
}
// Passed to TabbableContainer, extending its event-handling logic
@@ -323,8 +322,11 @@ export class InserterMenu extends Component {
// Implicit `undefined` return: let the event propagate
}
+ /**
+ * @inheritdoc
+ */
render() {
- const { instanceId } = this.props;
+ const { instanceId, items } = this.props;
const isSearching = this.state.filterValue;
return (
@@ -340,7 +342,6 @@ export class InserterMenu extends Component {
placeholder={ __( 'Search for a block' ) }
className="editor-inserter__search"
onChange={ this.filter }
- ref={ this.bindReferenceNode( 'search' ) }
/>
{ ! isSearching &&