Skip to main content

PicklistAttribute

Reference

  • Standard component that provides Picklist Attribute .i.e. dropdown editor

Props

  • config : attribute configuration

Usage

const { protrakComponents } = React.useContext(customWidgetContext);
const { Attribute } = protrakComponents;
Example of config property:
const config = {
"fieldType": "Attribute",
"attributeType": "Picklist",
"label": "PuneList",
"isVisible": false,
"isEditable": false,
"isRelatedTypeGeolocationAttribute": false,
"attributeName": "PuneList",
"isRequired": false,
"options": [
{
"name": "Shirpur",
"displayName": "Shirpur",
"disabled": false
},
{
"name": "Baramati",
"displayName": "Baramati",
"disabled": false
},
{
"name": "Daund",
"displayName": "Daund",
"disabled": false
},
{
"name": "Khed",
"displayName": "Khed",
"disabled": false
},
{
"name": "Mawal",
"displayName": "Mawal",
"disabled": false
}
],
"regExErrorMessage": "",
"isMultiselect": false,
"allowValueCaptureFromScan": false,
"actionSettingsShowAs": "Default",
"editor": "Default",
"renderer": "Default"
}
  return (
Attribute(config).renderInput(value, onEdit)
);
// pass configuration and onEdit function

UI

Picklist Attribute

Picklist Attribute

Picklist Attribute