Skip to main content

BooleanAttribute

Reference​

  • Standard component that provides Boolean attribute

Props​

  • config : attribute configuration

Usage​

const { protrakComponents } = React.useContext(customWidgetContext);
const { Attribute } = protrakComponents;

// Example of config property:
const config ={
"fieldType": "Attribute",
"attributeType": "Boolean",
"label": "Boolean",
"isVisible": false,
"isEditable": false,
"isRelatedTypeGeolocationAttribute": false,
"attributeName": "aaaBooleanAttrTest",
"isRequired": true,
"allowValueCaptureFromScan": false,
"actionSettingsShowAs": "Default"
}

return (
Attribute(config).renderInput(value, onEdit)
);
// pass configuration and onEdit function and onEdit function

UI​

Boolean Attribute