State definition using JSON configuration comparator problems
Hello,
The stateDefinition object that I gave the advanced grid is not doing what I want it to do.
State Definition:
"stateDefinition": {
"fieldName": "example",
"name": "example_alarm",
"type": "non-fixed",
"states": [
{
"comparator": "<",
"name": "min_value",
"styleName": LowStyle",
"value": "10"
},
{
"comparator": ">",
"name": "max_value",
"styleName": "HighStyle",
"value": "100"
}
]
}
I am using the exact same layout for the string type columns of my grid and it behaves the way I want it to, since I am using the "==" comparator.
However for my number type columns, I am not getting the range that I want. The outcome is as if the comparator was "==".
Now I realised that the value I gave it was a string, so I changed it to:
"stateDefinition": {
"fieldName": "example",
"name": "example_alarm",
"type": "non-fixed",
"states": [
{
"comparator": "<",
"name": "min_value",
"styleName": LowStyle",
"value": 10
},
{
"comparator": ">",
"name": "max_value",
"styleName": "HighStyle",
"value": 100
}
]
}
And now it does not work at all. Even though my defined column type and the data shape types all match (number).

