Skip to content

Commit e45843d

Browse files
authored
Kracken: Fix the exact match filter to pass the correct query param (#24786)
The correct suggestion API query param is called `exact_sld_matches_only`, so this PR is changing the filter name so we'll send the correct param to the suggestion endpoint.
1 parent 1e0da42 commit e45843d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

client/components/domains/register-domain-step/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class RegisterDomainStep extends React.Component {
211211
return {
212212
includeDashes: false,
213213
maxCharacters: '',
214-
showExactMatchesOnly: false,
214+
exactSldMatchesOnly: false,
215215
tlds: [],
216216
};
217217
}

client/components/domains/search-filters/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default class SearchFilters extends Component {
1818
filters: PropTypes.shape( {
1919
includeDashes: PropTypes.bool,
2020
maxCharacters: PropTypes.string,
21-
showExactMatchesOnly: PropTypes.bool,
21+
exactSldMatchesOnly: PropTypes.bool,
2222
tlds: PropTypes.arrayOf( PropTypes.string ),
2323
} ).isRequired,
2424
availableTlds: PropTypes.arrayOf( PropTypes.string ),
@@ -48,7 +48,7 @@ export default class SearchFilters extends Component {
4848
{ ...pick( this.props.filters, [
4949
'includeDashes',
5050
'maxCharacters',
51-
'showExactMatchesOnly',
51+
'exactSldMatchesOnly',
5252
] ) }
5353
onChange={ this.updateFilterValues }
5454
{ ...pick( this.props, [ 'onFiltersReset', 'onFiltersSubmit' ] ) }

client/components/domains/search-filters/more-filters.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class MoreFiltersControl extends Component {
2727
onChange: PropTypes.func.isRequired,
2828
onFiltersReset: PropTypes.func.isRequired,
2929
onFiltersSubmit: PropTypes.func.isRequired,
30-
showExactMatchesOnly: PropTypes.bool.isRequired,
30+
exactSldMatchesOnly: PropTypes.bool.isRequired,
3131
};
3232

3333
state = {
@@ -44,7 +44,7 @@ export class MoreFiltersControl extends Component {
4444
getFiltercounts() {
4545
return (
4646
( this.props.includeDashes && 1 ) +
47-
( this.props.showExactMatchesOnly && 1 ) +
47+
( this.props.exactSldMatchesOnly && 1 ) +
4848
( this.props.maxCharacters !== '' && 1 )
4949
);
5050
}
@@ -80,7 +80,7 @@ export class MoreFiltersControl extends Component {
8080
handleFiltersReset = () => {
8181
this.setState( { showOverallValidationError: false }, () => {
8282
this.togglePopover();
83-
this.props.onFiltersReset( 'includeDashes', 'maxCharacters', 'showExactMatchesOnly' );
83+
this.props.onFiltersReset( 'includeDashes', 'maxCharacters', 'exactSldMatchesOnly' );
8484
} );
8585
};
8686
handleFiltersSubmit = () => {
@@ -116,7 +116,7 @@ export class MoreFiltersControl extends Component {
116116
}
117117

118118
renderPopover() {
119-
const { includeDashes, maxCharacters, showExactMatchesOnly, translate } = this.props;
119+
const { includeDashes, maxCharacters, exactSldMatchesOnly, translate } = this.props;
120120

121121
return (
122122
<Popover
@@ -153,11 +153,11 @@ export class MoreFiltersControl extends Component {
153153
>
154154
<FormInputCheckbox
155155
className="search-filters__checkbox"
156-
checked={ showExactMatchesOnly }
156+
checked={ exactSldMatchesOnly }
157157
id="search-filters-show-exact-matches-only"
158-
name="showExactMatchesOnly"
158+
name="exactSldMatchesOnly"
159159
onChange={ this.handleOnChange }
160-
value="showExactMatchesOnly"
160+
value="exactSldMatchesOnly"
161161
/>
162162
<span className="search-filters__checkbox-label">
163163
{ translate( 'Show exact matches only' ) }

0 commit comments

Comments
 (0)