From 33ecddec6b17b572ead7127413464c1de65ad754 Mon Sep 17 00:00:00 2001 From: mattijauhiainen Date: Fri, 25 Nov 2016 13:42:02 +0800 Subject: [PATCH 1/2] Allow passing 'useNativeClamp' to clamp.js --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ff21d40..bbe5e31 100644 --- a/src/index.js +++ b/src/index.js @@ -57,11 +57,13 @@ Dotdotdot.propTypes = { PropTypes.bool ]).isRequired, truncationChar: PropTypes.string, + useNativeClamp: PropTypes.bool, className: PropTypes.string }; Dotdotdot.defaultProps = { - truncationChar: '\u2026' + truncationChar: '\u2026', + useNativeClamp: true }; module.exports = Dotdotdot; From 13aa5c93a74bad1b70b2a405c1d0c2f97e41d7d6 Mon Sep 17 00:00:00 2001 From: mattijauhiainen Date: Fri, 25 Nov 2016 13:42:02 +0800 Subject: [PATCH 2/2] Allow passing 'useNativeClamp' to clamp.js --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index bbe5e31..7ff7380 100644 --- a/src/index.js +++ b/src/index.js @@ -32,6 +32,7 @@ Dotdotdot.prototype.dotdotdot = function(container) { clamp(container, { clamp: this.props.clamp, + useNativeClamp: this.props.useNativeClamp, truncationChar: this.props.truncationChar }); }