Hi all,
I'm working on an app that is fairly similar to this example:
My end users want to be able to draw on the map to select their points and have the table below filter to those results. This does that. However, when they clear the selection polygon from the map, the filter on the table isn't removed, and this is confusing to the end users.
Is there a way in the 4.x version of the API to clear the filter? It looks like back in 3.x there was a clearFilter() method, but this does not exist in 4.x.
Thanks in advance!
Solved! Go to Solution.
You can make this small addition (line 5) to clear the filtered table (this would be line 231 in the sample).
document
.getElementById("clear-selection")
.addEventListener("click", () => {
featureTable.clearSelection();
featureTable.filterGeometry = null;
polygonGraphicsLayer.removeAll();
});
You can make this small addition (line 5) to clear the filtered table (this would be line 231 in the sample).
document
.getElementById("clear-selection")
.addEventListener("click", () => {
featureTable.clearSelection();
featureTable.filterGeometry = null;
polygonGraphicsLayer.removeAll();
});
Thanks a bunch! That worked!
Hi there,
This is a bug in the SDK sample. We will get this fixed in the sample.
Thanks for bringing this issue to our attention,
-Undral