From 302ff934d1c6c95e99f4af6690cccde45f85b75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Fri, 14 Dec 2018 17:30:07 +0100 Subject: [PATCH] Make sure 'filter:advanced' is set in the URL when setting a search filter --- .../packages/components/src/table/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-admin/packages/components/src/table/index.js b/plugins/woocommerce-admin/packages/components/src/table/index.js index cc54315110e..4531dc2fa00 100644 --- a/plugins/woocommerce-admin/packages/components/src/table/index.js +++ b/plugins/woocommerce-admin/packages/components/src/table/index.js @@ -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( ',' ), + } ); } }