Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gdavid's avatar

search relations only after 3 characters

i have a table that has 67000 rows when searching for customer number for example, it seems that the system starts searching from the first character i enter, and then since almost all customers has this character on their customer number, there are too many results and the system freeze for more than 60 seconds.

how can i define Nova to search only when i entered at least 3 characters ?

0 likes
1 reply
artcore's avatar

If it's triggered by javascript you can do something like this in your event handler

let timeout;

const search = document.getElementById('...your search input'),
           value = e.target.value;

  clearTimeout(timeout);

  timeout = setTimeout(() =>
  {
    if (value.length > 3)
     ...do search

  }, 500);

Please or to participate in this conversation.