I’m experiencing a problem with the display of “blank” values and “null” values when using the Combo multi-column mode. Below is example JSON data that will demonstrate the problem. I use the .load() method to load this into a combo object:
{
"template": {
"input": "#LastName#, #FirstName# #MiddleInitial#",
"columns": [
{
"header": "First Name",
"width": 120,
"option": "#FirstName#"
},
{
"header": "Middle Initial",
"width": 120,
"option": "#MiddleInitial#"
},
{
"header": "Last Name",
"width": 120,
"option": "#LastName#"
}
]
},
"options": [
{
"value": "1",
"text": {
"FirstName": "John",
"MiddleInitial": "P",
"LastName": "Doe"
}
},
{
"value": "2",
"text": {
"FirstName": "Jim",
"MiddleInitial": "",
"LastName": "Smith"
}
},
{
"value": "3",
"text": {
"FirstName": "Jane",
"MiddleInitial": null,
"LastName": "Doe"
}
}
]
}
I’ve attached a screenshot below to show how it renders. For Jim Smith, the middle name field is a blank value - in the combo the entire cell is missing from that row, causing the Last Name cell to be out of place. For Jane Doe, the middle name field is null - in this case the middle name field displays “[object Object]”.
The only workaround I’ve found so far is to replace blank values or null values with a single space, however this create a whole new set of problems for me… Any suggestions how to deal with this problem? Shouldn’t the multi-column combo handle blank and null values more gracefully?
Thanks in advance,
Mark