Hello,
I migrated from 4.10 to 4.11 an application using FeatureTemplates widget and noticed that the filterFunction callback parameter is not the one stated in the documentation anymore:
In 4.11, "filterFunction takes a function which passes in an object containing a label property of the FeatureLayer and a templates property containing the templates of this layer".
Thanks,
Nicolas
Hi Nicolas,
Thanks for catching that. We updated `name` to `label` in this latest release but failed to update the code snippet.
You just need to update it to read,
function myFilterFunction(filter) {
let containsName = filter.label.includes("animal");
return containsName;
}
If you are interested in how this would work, check out the Editor widget with configurations sample. This uses a custom grouping function. We'll fix this for our next SDK documentation update.
Hi Heather Gonzago,
You're pointing to your own server (heatherg-2.esri.com) in your link.
Whoops, one of those days and one too many open tabs in my browser. Thanks, I've updated it to point to the Developers site.