<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import findIndex from 'lodash/findIndex';

import Icon from 'components/ui/Icon';

class LayerMenuNativeComponent extends PureComponent {
  render() {
    const { layers, triggerClick } = this.props;
    return (
      <div className="c-layer-menu-native">
        <select
          onChange={(event) => {
            const { value } = event.target;
            if (value === -1) {
              triggerClick(null);
            } else {
              layers.forEach((g) => {
                const index = findIndex(g.layers, layer => event.target.value === layer.label);
                if (index !== -1) {
                  triggerClick(g.layers[index]);
                }
              });
            }<commit_msg>use the native findIndex instead of lodash<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';

import Icon from 'components/ui/Icon';

class LayerMenuNativeComponent extends PureComponent {
  render() {
    const { layers, triggerClick } = this.props;
    return (
      <div className="c-layer-menu-native">
        <select
          onChange={(event) => {
            const { value } = event.target;
            if (value === -1) {
              triggerClick(null);
            } else {
              layers.forEach((g) => {
                const index = g.layers.findIndex(layer => event.target.value === layer.label);
                if (index !== -1) {
                  triggerClick(g.layers[index]);
                }
              });
            }
{'fraction_non_alphanumeric': 0.12763320941759604, 'fraction_numerical': 0.0024783147459727386, 'mean_word_length': 1.8234265734265733, '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': '2224288', 'n_tokens_mistral': 432, 'n_tokens_neox': 419, 'n_words': 101}