From 04a7217c5bedfa4ef009662e76a8f2d7a071c972 Mon Sep 17 00:00:00 2001 From: Maksym Mykhailenko Date: Mon, 9 Jul 2018 19:36:00 +0800 Subject: [PATCH] fix freezing project dashboard page on mobile resolutions --- src/components/ProjectInfo/ProjectInfo.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/ProjectInfo/ProjectInfo.jsx b/src/components/ProjectInfo/ProjectInfo.jsx index 121d7a3be..e70647787 100644 --- a/src/components/ProjectInfo/ProjectInfo.jsx +++ b/src/components/ProjectInfo/ProjectInfo.jsx @@ -61,7 +61,14 @@ class ProjectInfo extends Component { project={project} currentMemberRole={currentMemberRole} duration={duration} - descLinesCount={matches ? 4 : Infinity} + descLinesCount={ + /* has to be not too big value here, + because the plugin will make this number of iterations + see https://github.com/ShinyChang/React-Text-Truncate/blob/master/src/TextTruncate.js#L133 + too big value may cause browser tab to freeze + */ + matches ? 4 : 1000 + } onChangeStatus={onChangeStatus} isSuperUser={isSuperUser} showLink