Fix filter by stock status dropdown ordering (https://github.com/woocommerce/woocommerce-blocks/pull/9127)
* Fix filter by stock status dropdown ordering * Update assets/js/blocks/stock-filter/utils.ts Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com> * Update assets/js/blocks/stock-filter/utils.ts Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com> --------- Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
This commit is contained in:
parent
7c25db1c80
commit
030a9ae267
|
@ -23,9 +23,9 @@ export const getActiveFilters = (
|
||||||
? params.split( ',' )
|
? params.split( ',' )
|
||||||
: ( params as string[] );
|
: ( params as string[] );
|
||||||
|
|
||||||
return Object.keys( filters ).filter( ( filter ) =>
|
const filterKeys = Object.keys( filters );
|
||||||
parsedParams.includes( filter )
|
|
||||||
);
|
return parsedParams.filter( ( param ) => filterKeys.includes( param ) );
|
||||||
};
|
};
|
||||||
|
|
||||||
export function generateUniqueId() {
|
export function generateUniqueId() {
|
||||||
|
|
Loading…
Reference in New Issue