mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 03:43:28 +10:00
Use urlParam param instead of variable
In submit handlers for multi select filters, use the url param passed to the function instead of the amenities url param variable.
This commit is contained in:
parent
743e7f072e
commit
e18f6c07d5
2 changed files with 4 additions and 4 deletions
|
|
@ -58,8 +58,8 @@ const SearchFiltersComponent = props => {
|
|||
const handleSelectOptions = (urlParam, options) => {
|
||||
const queryParams =
|
||||
options && options.length > 0
|
||||
? { ...urlQueryParams, [FEATURES_URL_PARAM]: options.join(',') }
|
||||
: omit(urlQueryParams, FEATURES_URL_PARAM);
|
||||
? { ...urlQueryParams, [urlParam]: options.join(',') }
|
||||
: omit(urlQueryParams, urlParam);
|
||||
|
||||
history.push(createResourceLocatorString('SearchPage', routeConfiguration(), {}, queryParams));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ class SearchFiltersMobileComponent extends Component {
|
|||
|
||||
const queryParams =
|
||||
options && options.length > 0
|
||||
? { ...urlQueryParams, [FEATURES_URL_PARAM]: options.join(',') }
|
||||
: omit(urlQueryParams, FEATURES_URL_PARAM);
|
||||
? { ...urlQueryParams, [urlParam]: options.join(',') }
|
||||
: omit(urlQueryParams, urlParam);
|
||||
|
||||
history.push(createResourceLocatorString('SearchPage', routeConfiguration(), {}, queryParams));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue