From 012fac44b4937042309bbee2d7dd9cca8a3e09df Mon Sep 17 00:00:00 2001 From: Pieterjan Van Saet Date: Mon, 24 Jan 2022 11:39:06 +0100 Subject: [PATCH 1/3] feat: allow parsing of nested values --- package-lock.json | 3 +- package.json | 1 + packages/table/package.json | 1 + packages/table/src/Table.js | 2 +- packages/table/src/helpers/Table.helpers.js | 4 +- packages/table/src/mocks/Table.mock.js | 66 ++++++++++++++------- 6 files changed, 50 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index cda89a98..2f58dc07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18192,8 +18192,7 @@ "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, "lodash.isequal": { "version": "4.5.0", diff --git a/package.json b/package.json index ad389be7..93a64586 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "dependencies": { "@a-ui/core": "^5.0.0", "classnames": "~2.2.6", + "lodash.get": "^4.4.2", "moment": "^2.29.1", "react-input-mask": "^2.0.4", "react-modal": "~3.5.1", diff --git a/packages/table/package.json b/packages/table/package.json index 823779f4..6bc8f1fb 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -13,6 +13,7 @@ "rc-slider": "~8.6.1", "classnames": "~2.2.6", "moment": "^2.24.0", + "lodash.get": "^4.4.2", "react-input-mask": "^2.0.4", "icon": "0.0.1-0" } diff --git a/packages/table/src/Table.js b/packages/table/src/Table.js index 001be90f..dbe08655 100644 --- a/packages/table/src/Table.js +++ b/packages/table/src/Table.js @@ -228,7 +228,7 @@ const Table = ({ - {currentPage && totalItems && currentPage && ( + {!!currentPage && !!totalItems && !!currentPage && (