import React, {Component, PropTypes} from 'react'; import PromptButton from '../base/PromptButton'; import Dropdown from '../base/Dropdown'; import DropdownHint from '../base/DropdownHint'; import GenerateCodeModal from '../modals/GenerateCodeModal'; import PromptModal from '../modals/PromptModal'; import * as models from '../../../backend/models'; import {showModal} from '../modals/index'; class RequestActionsDropdown extends Component { async _promptUpdateName () { const {request} = this.props; const name = await showModal(PromptModal, { headerName: 'Rename Request', defaultValue: request.name, hint: 'also rename requests by double clicking in the sidebar' }); models.request.update(request, {name}); } render () { const {request, ...other} = this.props; return ( ) } } RequestActionsDropdown.propTypes = { request: PropTypes.object.isRequired }; export default RequestActionsDropdown;