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: advanced search filter boolean files #3685

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

leopuleo
Copy link
Contributor

@leopuleo leopuleo commented Nov 9, 2023

Changes

With this PR we fixed a bug encountered while trying to save a filter with a boolean field:

  • handling and saving the filter field value as a string - as expected by FilterDTO
  • converting it back to boolean when returned back via GraphQLInputMapper

How to reproduce the bug

CleanShot.2023-11-09.at.13.05.49.mp4

How Has This Been Tested?

Jest + manually

@leopuleo leopuleo added this to the 5.38.0 milestone Nov 9, 2023
@leopuleo leopuleo self-assigned this Nov 9, 2023
return false;
}

return value || "";
Copy link
Contributor

Choose a reason for hiding this comment

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

If the value is false (boolean) you will get empty string as a result.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @brunozoric, for pointing this out. I changed it into the nullish coalescing operator.

@leopuleo leopuleo merged commit 20e651b into next Nov 10, 2023
61 of 63 checks passed
@leopuleo leopuleo deleted the leo/fix/filters-boolean-fields branch December 5, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants