Prevent incorrect badge redraw diffing

This commit is contained in:
Toby Zerner
2015-06-25 15:35:11 +09:30
parent cbd3509ad2
commit 099b910be9

View File

@ -6,10 +6,12 @@ export default class Badge extends Component {
var iconName = this.props.icon;
var label = this.props.title = this.props.label;
delete this.props.icon, this.props.label;
this.props.config = function(element) {
this.props.config = function(element, isInitialized) {
if (isInitialized) return;
$(element).tooltip();
};
this.props.className = 'badge '+(this.props.className || '');
this.props.key = this.props.className;
return m('span', this.props, [
icon(iconName+' icon-glyph'),