From deee09de295e4505d276652c7304ceea75d64dbe Mon Sep 17 00:00:00 2001 From: jquense Date: Fri, 28 Aug 2015 09:53:49 -0400 Subject: [PATCH] [fixed] stop rendering extra attributes on Progress bar dom nodes --- src/ProgressBar.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ProgressBar.js b/src/ProgressBar.js index fa0868317a..c5f153370c 100644 --- a/src/ProgressBar.js +++ b/src/ProgressBar.js @@ -59,7 +59,14 @@ const ProgressBar = React.createClass({ } return ( -
+
{content}
); @@ -73,18 +80,14 @@ const ProgressBar = React.createClass({ }, renderProgressBar() { + let { className, label, now, min, max, ...props } = this.props; + const percentage = this.getPercentage( - this.props.now, - this.props.min, - this.props.max + now, min, max ); - let label; - - if (typeof this.props.label === 'string') { + if (typeof label === 'string') { label = this.renderLabel(percentage); - } else { - label = this.props.label; } if (this.props.srOnly) { @@ -95,17 +98,17 @@ const ProgressBar = React.createClass({ ); } - const classes = classNames(this.props.className, this.getBsClassSet(), { + const classes = classNames(className, this.getBsClassSet(), { active: this.props.active, 'progress-bar-striped': this.props.active || this.props.striped }); return (