Search functionality not working as expected in Next.js and Prisma project #21343
Unanswered
MortezaIsvand
asked this question in
Q&A
Replies: 1 comment
-
Hello @MortezaIsvand 👋 This GitHub Discussion looks similar to the other Discussion that you initiated: Can you try the suggestion in the linked GitHub Discussion and check if that resolves the issue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hello,
I’m working on a Next.js 13.5 and Prisma project and facing a problem with the search functionality. In my project, when I don’t write a search term in the search input, no posts are shown. I can see posts only when I assign an empty string or a string in the search input field.
Here’s the relevant code:
page.tsx file:
route.tsx file:
SearchInput.tsx file which is located in the NavBar.tsx :
I’ve tried handling the case when search is null in my GET function, but it didn’t solve the problem. Any help would be appreciated.
Thank you!
How to reproduce (optional)
No response
Expected behavior (optional)
No response
Information about Prisma Schema, Client Queries and Environment (optional)
No response
Beta Was this translation helpful? Give feedback.
All reactions