Skip to main content

TextAttribute

Reference

  • Standard component that provides Text attribute

Props

  • config : attribute configuration

Usage

const { protrakComponents } = React.useContext(customWidgetContext);
const { Attribute } = protrakComponents;
Example of config property:
const config = {
"fieldType": "Attribute",
"attributeType": "Text",
"label": "Text",
"isVisible": false,
"isEditable": false,
"isRelatedTypeGeolocationAttribute": false,
"attributeName": "Country",
"isRequired": false,
"regExErrorMessage": "",
"allowValueCaptureFromScan": false,
"actionSettingsShowAs": "Default",
"editor": "Default",
"renderer": "Default"
}
  return (
Attribute(config).renderInput(value, onEdit)
);
// pass configuration and onEdit function

UI

Text Attribute