Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mwpw-138742): filter-params removed from url when group name has a space #117

Merged
merged 5 commits into from
Nov 29, 2023

Conversation

sheridansunier
Copy link
Collaborator

@sheridansunier sheridansunier commented Nov 21, 2023

Filter param is not removed from URL when filter cleared by clicking on the number next to the filter group when group name has a space.

This adds support for filter groups that have spaces (e.g. Content Type) as well as updates the chromedriver

@@ -443,7 +443,7 @@ const Container = (props) => {
const chFilter = key.toLowerCase().replace('ch_', '').replace(' ', '-');
if (key.indexOf(filterGroupPrefix) !== 0
&& !id.toLowerCase().includes(chFilter)
|| !group.toLowerCase().includes(chFilter)) {
|| !group.toLowerCase().replace(' ', '-').includes(chFilter)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will replace only the first space, you should use replaceAll(),
Try it in the console
'a b c d'.replace(' ', '-') vs. 'a b c d'.replaceAll(' ', '-')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@cmiqueo cmiqueo merged commit 8879177 into main Nov 29, 2023
9 checks passed
@sheridansunier sheridansunier deleted the MWPW-138742 branch March 15, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants