Remove the “Filter by Attribute” panel from products by category block (https://github.com/woocommerce/woocommerce-blocks/pull/321)
This commit is contained in:
parent
6f2719d36b
commit
2201fe7db7
|
@ -22,7 +22,6 @@ import PropTypes from 'prop-types';
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import getQuery from '../../utils/get-query';
|
import getQuery from '../../utils/get-query';
|
||||||
import ProductAttributeControl from '../../components/product-attribute-control';
|
|
||||||
import ProductCategoryControl from '../../components/product-category-control';
|
import ProductCategoryControl from '../../components/product-category-control';
|
||||||
import ProductOrderbyControl from '../../components/product-orderby-control';
|
import ProductOrderbyControl from '../../components/product-orderby-control';
|
||||||
import ProductPreview from '../../components/product-preview';
|
import ProductPreview from '../../components/product-preview';
|
||||||
|
@ -132,21 +131,6 @@ class ProductByCategoryBlock extends Component {
|
||||||
value={ orderby }
|
value={ orderby }
|
||||||
/>
|
/>
|
||||||
</PanelBody>
|
</PanelBody>
|
||||||
<PanelBody
|
|
||||||
title={ __( 'Filter by Attribute', 'woo-gutenberg-products-block' ) }
|
|
||||||
initialOpen={ false }
|
|
||||||
>
|
|
||||||
<ProductAttributeControl
|
|
||||||
selected={ attributes.attributes }
|
|
||||||
onChange={ ( value = [] ) => {
|
|
||||||
const selected = value.map( ( { id, attr_slug } ) => ( { // eslint-disable-line camelcase
|
|
||||||
id,
|
|
||||||
attr_slug,
|
|
||||||
} ) );
|
|
||||||
setAttributes( { attributes: selected } );
|
|
||||||
} }
|
|
||||||
/>
|
|
||||||
</PanelBody>
|
|
||||||
</InspectorControls>
|
</InspectorControls>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue