fix(logs): Minor tweaks to prevent react logging

This commit is contained in:
Ben Gotow 2015-03-26 18:25:21 -07:00
parent 9a0fce22c4
commit 7e6d5b64d8
2 changed files with 17 additions and 15 deletions

View file

@ -289,14 +289,14 @@ ComposerView = React.createClass
else if @isForwardedMessage() then return true
else return false
_onDragNoop: ->
false
_onDragNoop: (e) ->
e.preventDefault()
_onDrop: (e) ->
e.preventDefault()
for file in e.dataTransfer.files
Actions.attachFilePath({path: file.path, messageLocalId: @props.localId})
false
true
_onChangeParticipants: (changes={}) -> @_addToProxy(changes)
_onChangeSubject: (event) -> @_addToProxy(subject: event.target.value)

View file

@ -14,12 +14,13 @@ Token = React.createClass
action: React.PropTypes.func,
item: React.PropTypes.object,
configureDragDrop: (registerType) ->
registerType('token', {
dragSource:
beginDrag: ->
item: @props.item
})
statics:
configureDragDrop: (registerType) ->
registerType('token', {
dragSource:
beginDrag: (component) ->
item: component.props.item
})
render: ->
classes = React.addons.classSet
@ -62,12 +63,13 @@ TokenizingTextField = React.createClass
remove: React.PropTypes.func.isRequired,
showMenu: React.PropTypes.func,
configureDragDrop: (registerType) ->
registerType('token', {
dropTarget:
acceptDrop: (token) ->
@_addToken(token)
})
statics:
configureDragDrop: (registerType) ->
registerType('token', {
dropTarget:
acceptDrop: (component, token) ->
component._addToken(token)
})
getInitialState: ->
completions: []