Skip to content

Commit

Permalink
Fix: Categories Block: hierarchical Dropdown (#13567)
Browse files Browse the repository at this point in the history
Previously higher than second levels categories here rendered multiple times on the categories block, when "Show Hierarchy" and "Display as Dropdown" options here true.
This commit fixes that problem.
  • Loading branch information
jorgefilipecosta authored and youknowriad committed Mar 6, 2019
1 parent 1b2173a commit 6a77c06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/categories/edit.js
Expand Up @@ -106,7 +106,8 @@ class CategoriesEdit extends Component {
}

renderCategoryDropdown() {
const { showHierarchy, instanceId } = this.props;
const { instanceId } = this.props;
const { showHierarchy } = this.props.attributes;
const parentId = showHierarchy ? 0 : null;
const categories = this.getCategories( parentId );
const selectId = `blocks-category-select-${ instanceId }`;
Expand Down

0 comments on commit 6a77c06

Please sign in to comment.