diff --git a/src/controls/MMapRouteControl/index.ts b/src/controls/MMapRouteControl/index.ts index 7106b97..2bbe5f5 100644 --- a/src/controls/MMapRouteControl/index.ts +++ b/src/controls/MMapRouteControl/index.ts @@ -170,6 +170,8 @@ class MMapCommonRouteControl extends mappable.MMapComplexEntity { if (result === null) { this._waypoints[waypointIndex] = null; diff --git a/src/controls/MMapSearchControl/MMapSuggest/index.ts b/src/controls/MMapSearchControl/MMapSuggest/index.ts index 2f13952..304d705 100644 --- a/src/controls/MMapSearchControl/MMapSuggest/index.ts +++ b/src/controls/MMapSearchControl/MMapSuggest/index.ts @@ -77,8 +77,8 @@ class MMapSuggest extends mappable.MMapComplexEntity { element.classList.toggle(ACTIVE_CLASS, index === activeIndex); }); - if (suggestElements[activeIndex] && suggestElements[activeIndex]?.dataset?.title) { - this._props.setSearchInputValue(suggestElements[activeIndex].dataset.title); + if (suggestElements[activeIndex] && suggestElements[activeIndex]?.dataset?.text) { + this._props.setSearchInputValue(suggestElements[activeIndex].dataset.text); } }; @@ -222,7 +222,7 @@ class MMapSuggestItem extends mappable.MMapComplexEntity { this._rootElement.classList.add(SUGGEST_ITEM_CLASS); this._rootElement.tabIndex = -1; this._rootElement.addEventListener('click', this._props.onClick); - this._rootElement.dataset.title = this._props.suggestItem.title.text; + this._rootElement.dataset.text = this._props.suggestItem.title.text; if (this._props.suggestItem?.uri) { this._rootElement.dataset.uri = this._props.suggestItem.uri; }