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 29, 2019
1 parent 4a717ae commit ca7ffb5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,11 @@ class CategoriesEdit extends Component {
{ __( 'Categories' ) }
</label>
<select id={ selectId } className="wp-block-categories__dropdown">
{ categories.map( ( category ) => this.renderCategoryDropdownItem( category, 0 ) ) }
{ categories.map( ( category ) => {
if ( category.parent === 0 ) {
return this.renderCategoryDropdownItem( category, 0 );
}
} ) }
</select>
</Fragment>
);
Expand Down

0 comments on commit ca7ffb5

Please sign in to comment.