Don't show variations table when there is an active search (https://github.com/woocommerce/woocommerce-admin/pull/1601)

This commit is contained in:
Albert Juhé Lluveras 2019-02-20 10:21:19 +01:00 committed by GitHub
parent 1660484d4c
commit 0a10291969
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ export default compose(
withSelect( ( select, props ) => { withSelect( ( select, props ) => {
const { query } = props; const { query } = props;
const { getItems, isGetItemsRequesting, getItemsError } = select( 'wc-api' ); const { getItems, isGetItemsRequesting, getItemsError } = select( 'wc-api' );
const isSingleProductView = query.products && 1 === query.products.split( ',' ).length; const isSingleProductView =
! query.search && query.products && 1 === query.products.split( ',' ).length;
if ( isSingleProductView ) { if ( isSingleProductView ) {
const productId = parseInt( query.products ); const productId = parseInt( query.products );
const includeArgs = { include: productId }; const includeArgs = { include: productId };