I use the dadata service to get hints when entering an address followed by decomposition of the full address into its components (Region, City, Street, etc.). On the PC version of the application, everything works well, but when you try to do the same from a mobile device, when you enter the address, prompts appear, but when you click on it, the address is not entered into the field and the fields are not decomposed. I use the code from the example on dadata, I will attach it below. I understand it does not work onSelect. Tell me please, how can I solve this problem? Below is an example of the code used.
$("[Data-test-ID = 'Input_Address']").suggestions({ token: "Тут ключ API", type: "ADDRESS", count: 5, /* Вызывается, когда пользователь выбирает одну из подсказок */ onSelect: function(suggestion) { alert("Обработчик сработал"); console.log(suggestion); $("[Data-test-ID = 'Full1']").val(suggestion.unrestricted_value); $("[Data-test-ID = 'Flat1']").val(suggestion.data.block); $("[Data-test-ID = 'City1']").val(suggestion.data.city); if (suggestion.data.city == null) { $("[Data-test-ID = 'City1']").val(suggestion.data.settlement); } $("[Data-test-ID = 'Street1']").val(suggestion.data.street); $("[Data-test-ID = 'House1']").val(suggestion.data.house); $("[Data-test-ID = 'Region1']").val(suggestion.data.region); $("[Data-test-ID = 'postal_code1']").val(suggestion.data.postal_code); $("[Data-test-ID = 'ID1']").val(sek); } });
при нажатии на нее адрес не заносится в поле и не происходит декомпозиция по полям- where is the whole code? - Denis Heavenly