     return if index is NaN
     if index == -1
       packet = @props.battlePackets[0]
-      timestamp = 0
       @props.toggleAutoShow true
     else
       packet = @props.battlePackets[index]
-      timestamp = packet.poi_timestamp
       @props.toggleAutoShow false
 
     @setState
-      selectedTimestamp: timestamp
+      selectedPacket: packet
     @props.updateBattleDetail packet
 
   handleClickExport: ->

      packet = JSON.parse packet
      @props.updateBattleDetail packet
      @setState
        selectedTimestamp: 0
    finally
      window.showModal
        title: __ "Paste Data"

            <Col xs={6}>
            {
              options = []
              selectedIndex = -1  # Default: last battle (-1)
              selectedTimestamp = @state.selectedPacket?.poi_timestamp

              # Is selectedPacket in @props.battlePackets ?
              for packet, i in @props.battlePackets
                date = new Date(packet.poi_timestamp).toISOString()
                date = date.slice(0, 19).replace('T', ' ')
                comment = packet.poi_comment
                if packet.poi_timestamp == selectedTimestamp
                  selectedIndex = i
                options.push <option key={i} value={i}>{"#{date} #{comment}"}</option>

              # If selectedPacket exists but not in @props.battlePackets
              if selectedIndex < 0 and selectedTimestamp?
                selectedIndex = -2
                options.unshift <option key={-2} value={-2}>{__ "Selected battle"}</option>

              # Default option: last battle
              options.unshift <option key={-1} value={-1}>{__ "Last Battle"}</option>

              <Input type="select" ref="selectedIndex" value={selectedIndex} onChange={@handleSelectPacket}>
                {options}
