Hello All,
I'm using Web App Builder 2.2 Developer Edition.
Once feature is captured using Edit Widget, I want to apply attributes from the spatial query before apply edits. I have written my code as below to achieve this but query gets completed after attribute inspector is opened.
_canDeleteSelectionFeatures: function () {
// return ture if all features can be deleted,
// else return false.
var canDeleteFeatures = true;
var selectionFeatures = this._getSelectionFeatuers();
if(selectionFeatures.length === 0) {
canDeleteFeatures = false;
} else {
array.some(selectionFeatures, function (feature) {
var featureLayer = feature.getLayer && feature.getLayer();
//I have written below line
on(featureLayer, 'before-apply-edits', lang.hitch(this, this.onBeforeApplyEdits))
if (!featureLayer ||
!featureLayer.getEditCapabilities({ feature: feature }).canDelete