| 漏洞 ID 编号 |
BUG-000167739 |
| 已提交 | May 22, 2024 |
| 上次修改时间 | December 6, 2024 |
| 适用范围 | ArcGIS Maps SDK for JavaScript |
| 找到的版本 | 4.29 |
| 操作系统 | Windows OS |
| 操作系统版本 | 10.0 64 Bit |
| 状态 | As Designed
经开发团队审核,已确定此行为符合设计。 有关详细信息,请参阅“其他信息”部分。
|
附加信息
The description is hard to follow in this issue. But the issue is indicating that the layer is showing every feature when the layerView.filter.objectIds is set to an empty array. Instead the user thinks it must hide every feature. This feature is working as intended and matches the server behavior. If the user does not want to show any features when the objectIds is an empty array, set the filter.where clause to 1 = 0. This ensured no features are visible.
The FeatureFilter document to describe this behavior will be updated. Create an issue for JS API SDK to follow up on the documentation status.
解决办法
As a workaround, the code is modified to set FeatureEffect as null if no features are selected.
Sample code: https://codepen.io/RiddhiG/pen/eYaZbgR.
重现步骤