text: import React, { Component } from 'react'
  import { Dropdown } from 'semantic-ui-react'
  
  const options = [
    { key: 'English', text: 'English', value: 'English' },
    { key: 'French', text: 'French', value: 'French' },
    { key: 'Spanish', text: 'Spanish', value: 'Spanish' },
    { key: 'German', text: 'German', value: 'German' },
    { key: 'Chinese', text: 'Chinese', value: 'Chinese' },
  ]
  
  class DropdownExampleAllowAdditions extends Component {
    state = { options }
  
    handleAddition = (e, { value }) => {
      this.setState((prevState) => ({
        options: [{ text: value, value }, ...prevState.options],
      }))
    }
  
    handleChange = (e, { value }) => this.setState({ currentValue: value })
  
    render() {
      const { currentValue } = this.state
  
      return (
        <Dropdown
          options={this.state.options}
          placeholder='Choose Language'
          search
          selection
          fluid
          allowAdditions
          value={currentValue}
          onAddItem={this.handleAddition}
          onChange={this.handleChange}
        />
      )
    }
  }
  
  export default DropdownExampleAllowAdditions
  