<commit_before>import React, { Component } from 'react';
import NumberInput from 'grommet/components/NumberInput';

class BoundNumberInput extends Component {

   state = {};
   handleChange;

   constructor(props) {
      super(props);

      this.handleChange = props.handleChange;
   }

   updateValue = (event) => {
      this.handleChange(Number.parseInt(event.target.value));
   };

   render() {
      return (
         <NumberInput {...this.props} onChange={this.updateValue} />
      );
   }
}

export default BoundNumberInput;<commit_msg>Null values are set to 0<commit_after>import React, { Component } from 'react';
import NumberInput from 'grommet/components/NumberInput';

class BoundNumberInput extends Component {

   state = {};
   handleChange;

   constructor(props) {
      super(props);

      this.handleChange = props.handleChange;
   }

   updateValue = (event) => {
      if(event.target.value) {
         this.handleChange(Number.parseInt(event.target.value));
      } else {
         this.setState({value: 0});
      }
   };

   render() {
      return (
         <NumberInput {...this.props} onChange={this.updateValue} />
      );
   }
}

export default BoundNumberInput;
{'fraction_non_alphanumeric': 0.12916666666666668, 'fraction_numerical': 0.0016666666666666668, 'mean_word_length': 2.8867313915857604, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4929002', 'n_tokens_mistral': 359, 'n_tokens_neox': 346, 'n_words': 68}