Skip to content

Commit

Permalink
Fix default filter case
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Nov 3, 2023
1 parent 0988783 commit e41a1cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/edit-site/src/components/dataviews/in-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ import {
const OPERATOR_IN = 'in';

export default ( { filter, view, onChangeView } ) => {
const activeValue = view.filters.find(
let activeValue = view.filters.find(
( f ) => f.field === filter.id && f.operator === OPERATOR_IN
)?.value;

if ( ! activeValue ) {
activeValue = '';
}
return (
<SelectControl
value={ activeValue }
Expand Down

0 comments on commit e41a1cc

Please sign in to comment.