Merge pull request #4173 from vvlladd28/improvement/enities-tables/lable-include-dots

UI: Added the ability to get the value of a key that contains dots in the name to a table widgets
This commit is contained in:
Igor Kulikov 2021-03-03 05:26:00 -04:00 committed by GitHub
commit 2ac7b122dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,6 +324,9 @@ export function snakeCase(name: string, separator: string): string {
}
export function getDescendantProp(obj: any, path: string): any {
if (obj.hasOwnProperty(path)) {
return obj[path];
}
return path.split('.').reduce((acc, part) => acc && acc[part], obj);
}