<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import {
  View,
  Text
} from 'react-native';
import { Field } from 'redux-form';

import CheckBtn from 'components/common/form-inputs/check-btn';
import TextInput from '../text-detail';
import styles from '../styles';

function RadioInput(props) {
  function handlePress(value) {
    if (value !== props.input.value) {
      props.input.onChange(value);
    }
  }
  const { childQuestions } = props.question;
  return (
    <View style={styles.container}>
      <Text style={styles.label}>{props.question.label}</Text>
      {props.question.values.map((item, index) => {
        let conditionalField = null;
        if (childQuestions && childQuestions.length && childQuestions[0].conditionalValue === item.value) {
          const visible = props.input.value === item.value;
          conditionalField = (
            <Field
              visible={visible}
              name={childQuestions[0].name}
              component={TextInput}
              question={childQuestions[0]}
            />
          );
        }
        return [
          <View style={styles.inputContainer}>
            <CheckBtn
              key={index}
              label={item.label}
              checked={props.input.value === item.value}
              onPress={() => handlePress(item.value)}
            />
          </View>,
          conditionalField
        ];
      })}
    </View>
  );
}
<commit_msg>fix: adds scroll to radio input list<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import {
  View,
  ScrollView,
  Text
} from 'react-native';
import { Field } from 'redux-form';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';

import CheckBtn from 'components/common/form-inputs/check-btn';
import TextInput from '../text-detail';

import styles from '../styles';

function RadioInput(props) {
  function handlePress(value) {
    if (value !== props.input.value) {
      props.input.onChange(value);
    }
  }
  const { childQuestions } = props.question;
  return (
    <KeyboardAwareScrollView>
      <View style={styles.container}>
        <Text style={styles.label}>{props.question.label}</Text>
        <ScrollView
          style={styles.containerContent}
          showsVerticalScrollIndicator={false}
          showsHorizontalScrollIndicator={false}
        >
          {props.question.values.map((item, index) => {
            let conditionalField = null;
            if (childQuestions && childQuestions.length && childQuestions[0].conditionalValue === item.value) {
              const visible = props.input.value === item.value;
              conditionalField = (
                <Field
                  visible={visible}
                  name={childQuestions[0].name}
                  component={TextInput}
                  question={childQuestions[0]}
                />
              );
            }
            return [
              <View style={styles.inputContainer}>
                <CheckBtn
                  key={index}
                  label={item.label}
                  checked={props.input.value === item.value}
                  onPress={() => handlePress(item.value)}
                />
              </View>,
              conditionalField
            ];
          })}
        </ScrollView>
      </View>
    </KeyboardAwareScrollView>
  );
}

{'fraction_non_alphanumeric': 0.127709431751611, 'fraction_numerical': 0.0017574692442882249, 'mean_word_length': 1.9669852302345787, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, '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': '6023467', 'n_tokens_mistral': 911, 'n_tokens_neox': 885, 'n_words': 174}