Hi All,
I have to modify features, but geometries only, attributes should not be shown nor updated.
So, as by default Editor fieldConfig is exposing all attributes, I tried to empty it with null, [] or [{}].
Unfortunately all these values are causing many issues and errors in the javascript console.
https://codepen.io/Chris_Siveco/pen/dyvKzNP
Is there a way to edit only geometries with the Editor widget ?
Regards
Chris
Solved! Go to Solution.
How about leaving the fields in but not allowing them to be edited, such as:
fieldConfigs: [{
name: "HazardType",
label: "Hazard Type",
editable: false,
direction: "asc"
},
{
name: "descrip",
label: "Description",
editable: false,
direction: "asc"
},
{...
There is also a 'showNoValueOption' setting that might work (not much help on it). Or maybe the 'visibilityExpression' that ties to an Arcade expression that is always false?
How about leaving the fields in but not allowing them to be edited, such as:
fieldConfigs: [{
name: "HazardType",
label: "Hazard Type",
editable: false,
direction: "asc"
},
{
name: "descrip",
label: "Description",
editable: false,
direction: "asc"
},
{...
There is also a 'showNoValueOption' setting that might work (not much help on it). Or maybe the 'visibilityExpression' that ties to an Arcade expression that is always false?
Actually, with something like I made it work :
const pointInfos = {
layer: pointLayer,
fieldConfig: [{
name: "HazardType",
label: "Hazard type",
editable: false,
visibilityExpression:"1==2" //Here is the Trick not to have any attributes editable nor shown !
}]
BUT, after reviewing my codepen code, I also made it work with a regular fieldConfig: []
So, may be there was a bug in my original codepen.
Thank you Jeffrey
That second option looks a lot simpler 😁