Fixed #457 - Allow custom display callbacks in resolving fields

pull/642/head
Cagatay Civici 2020-09-08 15:16:20 +03:00
parent 74c5461388
commit 4b3734fc02
1 changed files with 19 additions and 13 deletions

View File

@ -58,6 +58,10 @@ export default class ObjectUtils {
}
static resolveFieldData(data, field) {
if (typeof field === 'function') {
return field(data);
}
else {
if (data && field) {
if (field.indexOf('.') === -1) {
return data[field];
@ -75,6 +79,8 @@ export default class ObjectUtils {
return null;
}
}
}
static filter(value, fields, filterValue) {
var filteredItems = [];