       el BeatmapDiscussions.BeatmapListItem, beatmap: beatmap, mode: 'version'
 
 
-  hideSelector: (e) ->
+  hideSelector: (e) =>
     return unless @state.showingSelector
     return if $(e.target).closest('.js-beatmap-list-selector').length
 
     @setSelector false
 
 
-  setSelector: (state) ->
+  setSelector: (state) =>
     return if @state.showingSelector == state
 
     Blackout.toggle(state)

        @props.beatmaps.map @beatmapListItem


  beatmapListItem: (beatmap) ->
    menuItemClasses = "#{bn}__item"
    menuItemClasses += " #{bn}__item--current" if beatmap.id == @props.currentBeatmap.id



bn = 'beatmap-list'

class BeatmapDiscussions.BeatmapList extends React.PureComponent
  constructor: (props) ->
    super props

    @state =
      showingSelector: false


  componentDidMount: =>
    $(document).on 'click.beatmapList', @hideSelector


  componentWillUnmount: =>
    $(document).off '.beatmapList'


  render: =>
    div
      className: "#{bn} #{"#{bn}--selecting" if @state.showingSelector}"
      a
