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(supabase): parse nested values correctly when using conditional filters #6240

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

pkarc
Copy link
Contributor

@pkarc pkarc commented Aug 8, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

Consider the following filter:

const filter: CrudFilter = {
  operator: 'or',
  value: [
    {
      field: 'name',
      operator: 'contains',
      value: 'foo',
    }
  ],
};

resolve to (name.ilike.foo) giving no results

What is the new behavior?

The filter should resolve to (name.ilike.%foo%)

fixes (#6239)

Notes for reviewers

If you consider having extra tests, I can add some to cover it fully

@pkarc pkarc requested a review from a team as a code owner August 8, 2024 18:14
Copy link

changeset-bot bot commented Aug 8, 2024

🦋 Changeset detected

Latest commit: 05da092

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/supabase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@aliemir aliemir linked an issue Aug 9, 2024 that may be closed by this pull request
@aliemir aliemir added this to the September Release milestone Aug 9, 2024
@aliemir aliemir changed the title fix(supabase): parse values correctly when using contains, containss, stratswith and endswith on a ConditionalFilter(#6239) fix(supabase): parse nested values correctly when using conditional filters Aug 13, 2024
@aliemir aliemir changed the base branch from master to releases/september August 13, 2024 14:54
Copy link
Member

@aliemir aliemir left a comment

Choose a reason for hiding this comment

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

Hey @pkarc thank you for the PR! There was a small lint issue, I've sent a small fix for it. We'll include this change in our next release 🙏

@aliemir aliemir merged commit 697561b into refinedev:releases/september Aug 14, 2024
11 of 12 checks passed
@aliemir aliemir mentioned this pull request Aug 14, 2024
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.

[BUG] Nested CrudFilters values with Supabase not correctly parsed
2 participants