From 3043a3a3b773074f2c81a31c5996e714017b1613 Mon Sep 17 00:00:00 2001 From: Anders Ekman Date: Thu, 24 Oct 2019 16:15:44 +0200 Subject: [PATCH] Update to use span instead of div divs are not allowed to be used inside p-tags for example --- src/TextTruncate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TextTruncate.js b/src/TextTruncate.js index 1e32502..80e4516 100644 --- a/src/TextTruncate.js +++ b/src/TextTruncate.js @@ -206,10 +206,10 @@ export default class TextTruncate extends Component { this.onTruncated(); this.onToggled(true); return ( -
+ {createElement(textElement, props, text.substr(0, startPos) + truncateText + ' ')} {textTruncateChild} -
+ ); }