From dffb531a45b5b68237fca2e311ef3c00c7004f7b Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 20 Nov 2019 11:15:39 +0400 Subject: [PATCH] Set max-width for owner name, show '...' if it doesn't fit into table cell --- package.json | 2 +- src/components/Table/TableHead.jsx | 2 +- src/theme/mui.js | 3 +++ yarn.lock | 8 ++++---- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index ea52704d..7421627f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "qrcode.react": "1.0.0", "react": "16.12.0", "react-dom": "16.12.0", - "react-final-form": "6.3.2", + "react-final-form": "6.3.3", "react-final-form-listeners": "^1.0.2", "react-hot-loader": "4.12.18", "react-qr-reader": "^2.2.1", diff --git a/src/components/Table/TableHead.jsx b/src/components/Table/TableHead.jsx index 07e38c78..428d7515 100644 --- a/src/components/Table/TableHead.jsx +++ b/src/components/Table/TableHead.jsx @@ -24,7 +24,7 @@ export const cellWidth = (width: number | typeof undefined) => { } return { - width: `${width}px`, + maxWidth: `${width}px`, } } diff --git a/src/theme/mui.js b/src/theme/mui.js index 3d88cd59..44188038 100644 --- a/src/theme/mui.js +++ b/src/theme/mui.js @@ -285,6 +285,9 @@ export default createMuiTheme({ fontWeight: 'normal', paddingTop: xs, paddingBottom: xs, + overflow: 'hidden', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis', }, }, MuiBackdrop: { diff --git a/yarn.lock b/yarn.lock index 585cfcdd..d5da1ee0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14901,10 +14901,10 @@ react-final-form-listeners@^1.0.2: dependencies: "@babel/runtime" "^7.1.5" -react-final-form@6.3.2: - version "6.3.2" - resolved "https://registry.yarnpkg.com/react-final-form/-/react-final-form-6.3.2.tgz#2c331540c8f5cbf6fbe75ecd98849a03b34dba6e" - integrity sha512-3eXCd9ScouKbf7GJubhUP0s8+aYCsltjjWZtvOKV+E0AeRjXmzQZfUAsKM+395+v1dLIyenB3x22ZQms2tWFRQ== +react-final-form@6.3.3: + version "6.3.3" + resolved "https://registry.yarnpkg.com/react-final-form/-/react-final-form-6.3.3.tgz#8856a92278de2733f83e88c75d9ef347294a66a0" + integrity sha512-hFLwLpLasywky46SovNEGlym7+N+3RKge1/cg+/fVec/YY0l4g0ihgjRof6PbkiYe4qGjKbwbrvlgfZ9/Uf8vw== dependencies: "@babel/runtime" "^7.4.5" ts-essentials "^3.0.2"