<commit_before>import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Autocomplete } from '/client/components/autocomplete2/index'

export class AutocompleteInlineList extends Component {
  static propTypes = {
    className: PropTypes.string,
    disabled: PropTypes.bool,
    filter: PropTypes.func,
    formatSelected: PropTypes.func,
    formatSearchResult: PropTypes.func,
    items: PropTypes.array,
    onSelect: PropTypes.func,
    placeholder: PropTypes.string,
    url: PropTypes.string
  }

  onRemoveItem = (item) => {
    const { items, onSelect } = this.props
    const newItems = items

    newItems.splice(item, 1)
    onSelect(newItems)
  }

  render () {
    const { items, className } = this.props

    return (
      <div className={`Autocomplete--inline ${className ? className : ''}`}>

        <div className='Autocomplete__list'>
          {items.map((item, i) => {
            return (<commit_msg>Fix bug with removing inline-list<commit_after>import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Autocomplete } from '/client/components/autocomplete2/index'
import { clone } from 'lodash'

export class AutocompleteInlineList extends Component {
  static propTypes = {
    className: PropTypes.string,
    disabled: PropTypes.bool,
    filter: PropTypes.func,
    formatSelected: PropTypes.func,
    formatSearchResult: PropTypes.func,
    items: PropTypes.array,
    onSelect: PropTypes.func,
    placeholder: PropTypes.string,
    url: PropTypes.string
  }

  onRemoveItem = (item) => {
    const { items, onSelect } = this.props
    const newItems = clone(items)

    newItems.splice(item, 1)
    onSelect(newItems)
  }

  render () {
    const { items, className } = this.props

    return (
      <div className={`Autocomplete--inline ${className ? className : ''}`}>

        <div className='Autocomplete__list'>
          {items.map((item, i) => {
            return (
{'fraction_non_alphanumeric': 0.11365953109072376, 'fraction_numerical': 0.0020387359836901123, 'mean_word_length': 3.267391304347826, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2975138', 'n_tokens_mistral': 569, 'n_tokens_neox': 568, 'n_words': 138}