From 020480e1addf825079cb4eb3988b103f31dcdc69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rge=20N=C3=A6ss?= Date: Mon, 19 Feb 2018 15:39:38 +0100 Subject: [PATCH] [components] Remove react-text-ellipsis due to perf issues --- packages/@sanity/components/package.json | 1 - .../components/src/previews/DetailPreview.js | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/packages/@sanity/components/package.json b/packages/@sanity/components/package.json index 47407907d22..0d5d669c13b 100644 --- a/packages/@sanity/components/package.json +++ b/packages/@sanity/components/package.json @@ -52,7 +52,6 @@ "react-portal": "^3.0.0", "react-sortable-hoc": "^0.6.3", "react-split-pane": "^0.1.63", - "react-text-ellipsis": "^1.2.2", "@sanity/react-tippy": "^1.2.4", "scroll": "^2.0.0" }, diff --git a/packages/@sanity/components/src/previews/DetailPreview.js b/packages/@sanity/components/src/previews/DetailPreview.js index e93a3235219..d2944022a5d 100644 --- a/packages/@sanity/components/src/previews/DetailPreview.js +++ b/packages/@sanity/components/src/previews/DetailPreview.js @@ -2,7 +2,6 @@ import PropTypes from 'prop-types' import React from 'react' import styles from 'part:@sanity/components/previews/detail-style' -import TextEllipsis from 'react-text-ellipsis' let index = 0 const fieldProp = PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.func]) @@ -115,18 +114,7 @@ export default class DetailPreview extends React.PureComponent { typeof description === 'function' && description({layout: 'detail'}) } { - typeof description === 'string' && ( - - {description} - - ) + typeof description === 'string' && description } { typeof description === 'object' && description