If I add column with empty values under search.highlighter then undefined will be shown in column explicitly.
undefined value is assigned to the row data in function returned by highlighter
columns.forEach(function (column) {
var property = column.property;
var value = row[property];
// Pick resolved value by convention
var resolvedValue = row['_' + property] || value;
ret[property] = value;
// Retain possibly resolved value
if (resolvedValue !== value) {
ret['_' + property] = resolvedValue;
}
if (typeof property === 'undefined') {
return;
}
// Stash highlighted value based on index
// so it can be extracted later for highlighting
ret._highlights[property] = matches({
value: resolvedValue,
query: query[property] || query.all
});
});
// Capture original row data too
return _extends({}, row, ret); // <--- row[property] === undefined assigned here
If I add column with empty values under
search.highlighter
thenundefined
will be shown in column explicitly.undefined
value is assigned to the row data in function returned byhighlighter
Is it done for some purpose? Thanks!