File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
projects/detail/containers Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
2+ import _ from 'lodash'
23import cn from 'classnames'
34import moment from 'moment'
45import PropTypes from 'prop-types'
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ class FeedView extends React.Component {
5858 this . onNewPostChange = this . onNewPostChange . bind ( this )
5959 this . onEditMessage = this . onEditMessage . bind ( this )
6060 this . onSaveMessageChange = this . onSaveMessageChange . bind ( this )
61+ this . onSaveMessage = this . onSaveMessage . bind ( this )
62+ this . onDeleteMessage = this . onDeleteMessage . bind ( this )
63+ this . onSaveTopic = this . onSaveTopic . bind ( this )
64+ this . onDeleteTopic = this . onDeleteTopic . bind ( this )
6165 this . onEditTopic = this . onEditTopic . bind ( this )
6266 this . onTopicChange = this . onTopicChange . bind ( this )
6367 this . onRefreshFeeds = this . onRefreshFeeds . bind ( this )
Original file line number Diff line number Diff line change @@ -35,7 +35,11 @@ class SingleFeedContainer extends React.Component {
3535 super ( props )
3636
3737 bindMethods . forEach ( ( method ) => {
38- this [ method ] = ( ) => this . props [ method ] ( this . props . id )
38+ // We cannot use an arrow function here, as later other component can apply .bind to these methods
39+ this [ method ] = function ( ) {
40+ // we cannot use .bind here as we already bound "this" in these methods to another React component and we don't want to override it
41+ return this . props [ method ] ( ...[ this . props . id , ...arguments ] )
42+ } . bind ( this )
3943 } )
4044 }
4145
You can’t perform that action at this time.
0 commit comments