Make sure 'filter:advanced' is set in the URL when setting a search filter

This commit is contained in:
Albert Juhé Lluveras 2018-12-14 17:30:07 +01:00
parent 07227271fd
commit 302ff934d1
1 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import {
generateCSVDataFromTable,
generateCSVFileName,
} from '@woocommerce/csv-export';
import { getIdsFromQuery } from '@woocommerce/navigation';
import { getIdsFromQuery, updateQueryString } from '@woocommerce/navigation';
/**
* Internal dependencies
@ -158,7 +158,10 @@ class TableCard extends Component {
[ ...selectedRows, ...ids ].join( ',' )
);
} else if ( searchBy ) {
onQueryChange( searchParam )( ids.join( ',' ) );
updateQueryString( {
filter: 'advanced',
[ searchParam ]: ids.join( ',' ),
} );
}
}