I am working on upgrading an app from 4.30 to 4.32 which has custom search sources, similar to this sample:
However, it is always returning the first suggestion in the getResults method. After trying the sample, I see the same behavior there as well. It works correctly in the sample if I revert back to 4.31.
If I type "8 boul" in the search widget, and then select 8 La Boule 79240 Vernoux-en-Gatine, it selects and zooms to 8 Boule 22940 Plaintel, which is the first in the list.
Solved! Go to Solution.
Hi @Justin_Greco, we may have found the issue. The "key" should be a unique identifier for the suggestion. Currently, the sample needs to be updated to reflect this (coming soon). If you modify line 79 of the sample to be be a unique identifier, it seems to work as expected for me. Can you test in your app?
Test-app
https://codepen.io/noash/pen/dPypPKG?editors=1010
Images of before and after of code from sample attached.
Thanks for reporting, and for testing so quickly @Justin_Greco. I see the behavior in the sample. We are investigating.
Hi @Justin_Greco, we may have found the issue. The "key" should be a unique identifier for the suggestion. Currently, the sample needs to be updated to reflect this (coming soon). If you modify line 79 of the sample to be be a unique identifier, it seems to work as expected for me. Can you test in your app?
Test-app
https://codepen.io/noash/pen/dPypPKG?editors=1010
Images of before and after of code from sample attached.
Just tested in my app and that fixed it! Thanks for the quick response.