Permalink
Browse files

fix(datatable): Fix looking up nested keys in data for column

  • Loading branch information...
RWOverdijk committed Jul 27, 2016
1 parent 7f439b9 commit 30fa60ae7f629fa337efee7b150f971c5d871a47
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/datatable.js
@@ -218,11 +218,10 @@ export class DataTable {
}
displayValue(row, ...propertyName) {
return fetchFrom(row, normalizeKey(...propertyName));
return fetchFrom(row, ...normalizeKey(...propertyName));
}
}
/**
* Used to normalize keys of mixed array and dot-separated string to a single array of undotted strings
* @param {string|Array<keys>} keys (dot-separated) string(s) or array of keys
@@ -238,6 +237,7 @@ function normalizeKey(key, ...rest) {
* if not we concat our normalized key with the normalized rest
*/
let normalized = Array.isArray(key) ? normalizeKey(...key) : key.split('.');
return rest.length === 0 ? normalized : normalized.concat(normalizeKey(...rest));
}

0 comments on commit 30fa60a

Please sign in to comment.