Skip to content

Commit

Permalink
Fix: Categories Block: hierarchical Dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jan 30, 2019
1 parent 4a717ae commit 2853d14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/block-library/src/categories/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ class CategoriesEdit extends Component {
{ __( 'Categories' ) }
</label>
<select id={ selectId } className="wp-block-categories__dropdown">
{ categories.map( ( category ) => this.renderCategoryDropdownItem( category, 0 ) ) }
{ categories.filter(
( { parent } ) => parent === 0
).map(
( category ) => {
return this.renderCategoryDropdownItem( category, 0 );
}
) }
</select>
</Fragment>
);
Expand Down

0 comments on commit 2853d14

Please sign in to comment.