Hi everyone,
I'm using the select
input field to filter my database. I want the API to be called only when the inputValue
has 3 or more characters. While this part is working as expected, I am facing an issue.
If the inputValue
is less than 3 characters, the filter searches within the data (assuming I'm fetching 10 records at a time) and still hits the API. I want to prevent the API from being called after the initial load if the inputValue
is less than 3 characters, even if the value is present in the existing data. Essentially, I only want the filter to apply when the inputValue
is 3 or more characters, even when filtering the existing data.
Any guidance on how to achieve this would be greatly appreciated!