You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug 🐛
i'm using algolia search and instant search library in my project, The problem is that when i set the searchMode to AsYouType the search works perfectly fine and i get the expected results, but when i change it to onSubmit the search will not initiate.
To Reproduce 🔍
first i thought that the problem was in the search view from the material components, and since algolia doesn't support it i've changed it to a basic EditText. But even with edit text and it is the same problem.
my plan is to find out how to make it work with the editText and after that use searchView.editText, because the SearchView has a child EditText.
Here's how i declare the edit text in my layout XML file:
`
<EditText
PS: When using the searchView from ViewAppCompat the search works perfectly fine with onSubmit search mode.
The text was updated successfully, but these errors were encountered:
Zineddine231
changed the title
SearchMode.OnSubmit not working
SearchMode.OnSubmit not working with EditText/material_SearchView
Jun 6, 2024
Zineddine231
changed the title
SearchMode.OnSubmit not working with EditText/material_SearchView
SearchMode.OnSubmit not working with EditText
Jun 6, 2024
After some research in the instant search library and a comparision between the two functions: SearchBoxViewAppCompat and SearchBoxViewEditText it turned out that the EditText doesn't have a specific method to handle input submission unlike the SearchView from ViewAppCompat.
THE SOLUTION : is to set an EditorActionListener for the EditText:
Describe the bug 🐛
i'm using algolia search and instant search library in my project, The problem is that when i set the searchMode to AsYouType the search works perfectly fine and i get the expected results, but when i change it to onSubmit the search will not initiate.
To Reproduce 🔍
first i thought that the problem was in the search view from the material components, and since algolia doesn't support it i've changed it to a basic EditText. But even with edit text and it is the same problem.
my plan is to find out how to make it work with the editText and after that use
searchView.editText
, because theSearchView
has a childEditText
.Here's how i declare the edit text in my layout XML file:
`
<EditText
and this is the backend side:
`
private lateinit var connection: ConnectionHandler
private lateinit var recyclerView: RecyclerView
private lateinit var editText: EditText
private lateinit var searchBoxView: SearchBoxViewEditText
PS: When using the searchView from ViewAppCompat the search works perfectly fine with onSubmit search mode.
The text was updated successfully, but these errors were encountered: