From 55ec7f8cf20873f247defcffeac57031a99af051 Mon Sep 17 00:00:00 2001 From: Zoltan Toth Date: Tue, 15 Jan 2019 15:03:27 -0500 Subject: [PATCH] New build --- lib/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/index.js b/lib/index.js index 9aec0b2..043abb2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -406,6 +406,14 @@ var ClampLines = function (_PureComponent) { window.removeEventListener('resize', this.debounced); } } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps) { + if (prevProps.text !== this.props.text) { + this.original = this.props.text; + this.clampLines(); + } + } }, { key: 'debounce', value: function debounce(func, wait, immediate) {