From 712a440ef08748d65f5612a82f72a2b61b3f2921 Mon Sep 17 00:00:00 2001 From: fraserxu Date: Sat, 29 Nov 2014 09:03:40 +0800 Subject: [PATCH] add unique key prop to child in an array for dialog component --- src/js/dialog.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/dialog.jsx b/src/js/dialog.jsx index 04c2f505477157..5b0deeffff226b 100644 --- a/src/js/dialog.jsx +++ b/src/js/dialog.jsx @@ -45,9 +45,9 @@ var Dialog = React.createClass({ render: function() { var mainClasses = this.getClasses('dialog', { 'show': this.state.open }), - actions = this.props.actions.map(function(a) { - if (a.onClick) return
{a.text}
; - return
{a.text}
; + actions = this.props.actions.map(function(a, index) { + if (a.onClick) return
{a.text}
; + return
{a.text}
; }.bind(this)); return ( @@ -81,7 +81,7 @@ var Dialog = React.createClass({ _handleClickAway: function() { this.dismiss(); - }, + }, _checkEscapeKeyUp: function(e) { if (e.keyCode == KeyCode.ESC) {