The suggestQueryParams property of the Search widget does not work as expected.
上次发布: August 2, 2017ArcGIS API for JavaScript
漏洞 ID 编号
BUG-000104601
已提交
April 20, 2017
上次修改时间
June 5, 2024
适用范围
ArcGIS API for JavaScript
找到的版本
3.20
操作系统
Windows OS
操作系统版本
10.0 64 Bit
修正版本
4.4
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
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>