<commit_before>import React from "react";
import PropTypes from "prop-types";
import "./style.css";

export default class SearchBar extends React.Component {
  constructor(props) {
    super(props);
    this.handleChange = this.handleChange.bind(this);
  }
  static propTypes = {
    value: PropTypes.string,
    filter: PropTypes.func,
    inputRef: PropTypes.func
  };
  handleChange(e) {
    if (this.props.filter) this.props.filter(e.target.value);
  }
  render() {
    return (
      <div style={{
        position: "relative"
      }}>
        <input ref={this.props.inputRef} className="search" type="search" placeholder="Search tests..." value={this.props.value} onChange={this.handleChange} />
        <label htmlFor={this.id} className="si-search"></label>
      </div>
    );
  }<commit_msg>dont show the glass if there is a value<commit_after>import React from "react";
import PropTypes from "prop-types";
import "./style.css";

export default class SearchBar extends React.Component {
  constructor(props) {
    super(props);
    this.handleChange = this.handleChange.bind(this);
  }
  static propTypes = {
    value: PropTypes.string,
    filter: PropTypes.func,
    inputRef: PropTypes.func
  };
  handleChange(e) {
    if (this.props.filter) this.props.filter(e.target.value);
  }
  render() {
    return (
      <div style={{
        position: "relative"
      }}>
        <input ref={this.props.inputRef} className="search" type="search" placeholder="Search tests..." value={this.props.value} onChange={this.handleChange} />
        <label htmlFor={this.id} className="si-search" style={{
          display: !this.props.value ? "block" : "none"
        }}></label>
      </div>
    );
  }
{'fraction_non_alphanumeric': 0.15064478311840562, 'fraction_numerical': 0.0, 'mean_word_length': 3.194103194103194, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5093290', 'n_tokens_mistral': 512, 'n_tokens_neox': 523, 'n_words': 114}