Description
In Search Services results appear null or undefined in case of subproperties not exists in the layer
How to reproduce
Look ${properties.not_exists_prop} at displayName
Below is the configuration that can reproduce the bug to add in localConfig, section desktop:
{
"name": "Search",
"cfg": {
"withToggle": [
"max-width: 768px",
"min-width: 768px"
],
"searchOptions": {
"services": [
{
"type": "wfs",
"name": "Search1",
"displayName": "${properties.not_exists_prop} hello world",
"subTitle": "level: mapstore:states",
"priority": 1,
"options": {
"url": "https://gs-stable.geo-solutions.it/geoserver/wfs",
"typeName": "mapstore:states",
"queriableAttributes": [
"state_name"
],
"sortBy": "",
"maxFeatures": 5
}
},
{
"type": "wfs",
"name": "Search2",
"displayName": "${properties.not_exists_prop} cose",
"subTitle": "level: mapstore:states",
"priority": 1,
"options": {
"url": "https://gs-stable.geo-solutions.it/geoserver/wfs",
"typeName": "mapstore:states",
"queriableAttributes": [
"state_name"
],
"sortBy": "",
"maxFeatures": 5
}
}
]
}
}
}
Expected Result
strip all null or undefined subprop with empty char or white space
Current Result
show null or undefined
Description
In Search Services results appear
nullorundefinedin case of subproperties not exists in the layerHow to reproduce
Look
${properties.not_exists_prop}atdisplayNameBelow is the configuration that can reproduce the bug to add in localConfig, section
desktop:{ "name": "Search", "cfg": { "withToggle": [ "max-width: 768px", "min-width: 768px" ], "searchOptions": { "services": [ { "type": "wfs", "name": "Search1", "displayName": "${properties.not_exists_prop} hello world", "subTitle": "level: mapstore:states", "priority": 1, "options": { "url": "https://gs-stable.geo-solutions.it/geoserver/wfs", "typeName": "mapstore:states", "queriableAttributes": [ "state_name" ], "sortBy": "", "maxFeatures": 5 } }, { "type": "wfs", "name": "Search2", "displayName": "${properties.not_exists_prop} cose", "subTitle": "level: mapstore:states", "priority": 1, "options": { "url": "https://gs-stable.geo-solutions.it/geoserver/wfs", "typeName": "mapstore:states", "queriableAttributes": [ "state_name" ], "sortBy": "", "maxFeatures": 5 } } ] } } }Expected Result
strip all null or undefined subprop with empty char or white space
Current Result
show
nullorundefined