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

Problem with using .withTrashed() after .filter() with Adonis Lucid Filter #25

Open
capoia opened this issue Nov 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@capoia
Copy link

capoia commented Nov 8, 2024

I'm encountering an issue when trying to use the .withTrashed() method right after .filter() from the adonis-lucid-filter package. TypeScript doesn't recognize the .withTrashed() method, even though it works fine at runtime.

Additionally, the behavior seems inconsistent because if I reverse the order (using .withTrashed() before .filter()), the code doesn't work correctly.

Steps to reproduce:

  • Use .filter() followed by .withTrashed()
  • Notice that TypeScript generates an error indicating the method is not recognized
  • Change the order of the methods to .withTrashed() before .filter() and observe that TypeScript generates an error indicating the method is not recognized

Expected behavior: Ideally, both methods should work in sequence without conflicts or type recognition issues.

Questions: I'm unsure if this is the correct repository to open the issue, or if it should be in the lucid-filter repository.

@LookinGit LookinGit added the bug Something isn't working label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants