I tried adding the following to my mounted event on this view but I get a “searchbar is not a function” error. Its possible that the example is from v3? I was not able to find a doc or forum reference for v4 usage.
It wasn’t clear to me from the docs how to compose the create with customSearch but now that I see your example the docs make a LOT more sense. Maybe add the above example to the searchbar page for future travelers.
The ‘search’ event gets triggered with every character added to the search term. In my case I only want to search once a term is completely entered rather than progressively. I don’t suppose there is a setting to trigger the search function only after the user hits return (or Done on mobile)?
I have this working with @submit and calling an onSubmit method I defined. How do I get ahold of the event coming in so I can call e.preventDefault? Also, what is the proper way to look up the element values. Usually with the event I would use event.target.elements.search.value to lookup the search term.
Its almost like the e.preventDefault is not effective.
On the page that describes event handling it does not list the events that are covered with the @ pattern. The example shows @click which is good. The onsubmit ends up being @submit rather than @onsubmit. Is there a list in the docs of the events covered and which are shortened or named differently?