Use the inputDelay option via JavaScript or data-input-delay in HTML to decide when to trigger the Event Listener for the modal search for debounce functionality.
If you are using a complete and ready to use predefined and rendered <select> with all <option> elements possible and do not rely on AJAX/FETCH or async/await inside the customSearch option, it is best to set the inputDelay = 0 to archive the maximum user experience by having no debounce and create interactions as smooth as possible!
Possible options to search for are: Banana, Apple, Orange, Lemon, Pepper, Mushrooms, Cabbages, Celery, Brocoli, Garlic