laptop and a wrench

Bug

The suggestQueryParams property of the Search widget does not work as expected.

Zuletzt veröffentlicht: August 2, 2017 ArcGIS API for JavaScript
Bug-ID-Nummer BUG-000104601
EingereichtApril 20, 2017
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS API for JavaScript
Gefunden in Version3.20
BetriebssystemWindows OS
Betriebssystemversion10.0 64 Bit
Behoben in Version4.4
StatusFixed

Workaround

In versions 3.20 and 4.3, use the esriRequest.setRequestPreCallback to append the needed SQL to the queryTask generated by the Search widget. Samples of both these workflows are below. // Version 3.20<a href="http://jsbin.com/kevewef/2/edit?js,output" target="_blank">http://jsbin.com/kevewef/2/edit?js,output</a> // Version 4.30<a href="http://jsbin.com/yulejo/2/edit?js,output" target="_blank">http://jsbin.com/yulejo/2/edit?js,output</a>In addition to the above workarounds there are also workarounds for specific versions. In version 3.20, leverage a defintionQuery against the FeatureLayer used in the Search widget. The definitionQuery was automatically appended to the QueryTask sent by the Search widget. Version 3.20<a href="http://jsbin.com/ramime/1/edit?js,output" target="_blank">http://jsbin.com/ramime/1/edit?js,output</a>In version 4.3 post-process the Suggestions by wiring into the suggest-complete event and removing the un-needed suggestions from the results array. Version 4.3<a href="http://jsbin.com/qobaji/5/edit?js,output" target="_blank">http://jsbin.com/qobaji/5/edit?js,output</a>

Schritte zur Reproduzierung

Bug-ID: BUG-000104601

Software:

  • ArcGIS API for JavaScript

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln