Filter Widget Error - 'isShowInMap' null
mayur9785 opened this issue · 3 comments
mayur9785 commented
Hi,
I added Filter widgets and when I hit apply I get the error at line number 303 in widgets.js file of Filter widget "Cannot read property 'isShowInMap' of null".
below is widgets configuration in Viewer.js
filter: {
include: true,
id: 'filter',
type: 'titlePane',
iconClass: 'fa fa-filter',
position: 10,
title: 'Filter',
path: 'jimu/BaseWidgetPanel',
canFloat: true,
open: false,
options: {
// use the WAB WidgetManager (required)
widgetManager: true,
layerControlLayerInfos: true,
//style: 'min-height: 500px;',
config: {
widgets: [
{
id: 'WABFilter',
uri: 'wabwidgets/Filter/Widget', // Note the path
// more complex configuration passed to WAB Widget
config: {
filters: [{
"url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
"name": "Project Type",
"filter": {
"logicalOperator": "AND",
"parts": [{
"fieldObj": {
"name": "PROJECT_TYPE",
"label": "PROJECT_TYPE",
"shortType": "string",
"type": "esriFieldTypeString"
},
"operator": "stringOperatorIs",
"valueObj": {
"isValid": true,
"type": "unique",
"value": ""
},
"interactiveObj": {
"prompt": "Project Type is",
"hint": "",
"cascade": "none"
},
"caseSensitive": false
}],
"expr": ""
},
"icon": "",
"enableMapFilter": true
}, {
"url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
"name": "Works Programme",
"filter": {
"logicalOperator": "AND",
"parts": [{
"fieldObj": {
"name": "WORKS_PROGRAMME",
"label": "WORKS_PROGRAMME",
"shortType": "string",
"type": "esriFieldTypeString"
},
"operator": "stringOperatorIs",
"valueObj": {
"isValid": true,
"type": "unique",
"value": ""
},
"interactiveObj": {
"prompt": "Works Programme is",
"hint": "",
"cascade": "none"
},
"caseSensitive": false
}],
"expr": ""
},
"icon": "",
"enableMapFilter": true
}, {
"url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
"name": "Audit Type",
"filter": {
"logicalOperator": "AND",
"parts": [{
"fieldObj": {
"name": "AUDIT_TYPE",
"label": "AUDIT_TYPE",
"shortType": "string",
"type": "esriFieldTypeString"
},
"operator": "stringOperatorIs",
"valueObj": {
"isValid": true,
"type": "unique",
"value": ""
},
"interactiveObj": {
"prompt": "Audit Type is",
"hint": "",
"cascade": "none"
},
"caseSensitive": false
}],
"expr": ""
},
"icon": "",
"enableMapFilter": true
}, {
"url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
"name": "Audit Stage",
"filter": {
"logicalOperator": "AND",
"parts": [{
"fieldObj": {
"name": "AUDIT_STAGE",
"label": "AUDIT_STAGE",
"shortType": "string",
"type": "esriFieldTypeString"
},
"operator": "stringOperatorIs",
"valueObj": {
"isValid": true,
"type": "unique",
"value": ""
},
"interactiveObj": {
"prompt": "Audit Stage is",
"hint": "",
"cascade": "none"
},
"caseSensitive": false
}],
"expr": ""
},
"icon": "",
"enableMapFilter": true
}]
}
}
]
}
}
},
Please suggest me on this.
tmcgee commented
@mayur9785 Sorry I was unable to look into this at the time. Is it still an issue?
mayur9785 commented
Hi Tim,
I still have the issue. I tried to find the solution but didn't get.
triesco commented
Im having same issue and I think it is exepcting a layerid from webmap or wab. Has anyone been able to find a solution for this??