"Remove File" button in AddShapefile widget in WAB 2.1

Discussion created by SharonQin on Sep 1, 2016

The "Remove File" button in AddShapefile widget in WAB2.1 only remove the most recent shapefile if multiple shapefiles are added to show on the map. I wouldn't say this is a bug since the name of the button says "remove file" not "remove files", but it is not convenient for users if they do want to clear all shapefiles on the map. The solution to achieve this is to bring this.arrayFeatureLayer = []; out of on event handler inside widget.js of addshapefile widget as attached screenshot shows, so arrayFeatureLayer will not be an empty array every time the new shapefile is added.