Skip to content

Commit 61ad3f8

Browse files
fix: filter control placeholder text
1 parent af424bc commit 61ad3f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assets/src/dashboard/parts/connected/settings/FilterControl.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ const FilterControl = ({
102102
};
103103
});
104104

105+
const defaultFilterOperator = optimoleDashboardApp.strings.options_strings.filter_operator_contains;
105106
const [ filterType, setFilterType ] = useState( FILTER_TYPES.FILENAME );
106107
const [ filterOperator, setFilterOperator ] = useState( optimoleDashboardApp.strings.options_strings.filter_operator_contains );
107108
const [ filterValue, setFilterValue ] = useState( '' );
108-
const [ filterMatchType, setFilterMatchType ] = useState( optimoleDashboardApp.strings.options_strings.filter_operator_contains );
109+
const [ filterMatchType, setFilterMatchType ] = useState( defaultFilterOperator );
109110
const [ lengthError, setLengthError ] = useState( false );
110111

111112
const changeFilterType = value => {
@@ -127,6 +128,7 @@ const FilterControl = ({
127128
setLengthError( false );
128129
setFilterValue( selectedValue );
129130
setFilterType( value );
131+
setFilterMatchType( filterValue );
130132
};
131133

132134
const updateFilterValue = value => {

0 commit comments

Comments
 (0)