Skip to content

Commit

Permalink
Merge pull request #877 from smart-village-solutions/fix/SVA-1099-fix…
Browse files Browse the repository at this point in the history
…-input's-nesting-problem

fix: consul input's nesting problem
  • Loading branch information
ardasnturk authored Aug 1, 2023
2 parents 550db72 + d6f8978 commit 5a3bae6
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions src/components/screens/consul/Debates/NewDebate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import PropTypes from 'prop-types';
import React, { useState } from 'react';
import { useMutation } from 'react-apollo';
import { useForm } from 'react-hook-form';
import { Alert, StyleSheet } from 'react-native';
import { Alert, Platform, StyleSheet } from 'react-native';

import { namespace, secrets, texts } from '../../../../config';
import { device, namespace, normalize, secrets, texts } from '../../../../config';
import { ConsulClient } from '../../../../ConsulClient';
import { QUERY_TYPES } from '../../../../queries';
import { START_DEBATE, UPDATE_DEBATE } from '../../../../queries/consul';
Expand Down Expand Up @@ -162,42 +162,47 @@ NewDebate.propTypes = {

const INPUTS = [
{
name: 'title',
autoCapitalize: 'none',
autoCompleteType: 'off',
keyboardType: 'default',
label: texts.consul.startNew.newDebateTitleLabel,
name: 'title',
placeholder: texts.consul.startNew.newDebateTitleLabel,
keyboardType: 'default',
textContentType: 'none',
autoCompleteType: 'off',
autoCapitalize: 'none',
rules: {
required: texts.consul.startNew.emptyError,
minLength: { value: 4, message: 'ist zu kurz (minimum 4 Zeichen)' }
}
},
textContentType: 'none'
},
{
name: 'description',
multiline: true,
minHeight: 150,
autoCapitalize: 'none',
autoCompleteType: 'off',
containerStyle: {
marginBottom: Platform.select({ android: normalize(130), ios: normalize(85) })
},
keyboardType: 'default',
label: texts.consul.startNew.newDebateDescriptionLabel,
minHeight: 150,
multiline: true,
textAlignVertical: 'top',
name: 'description',
placeholder: texts.consul.startNew.newDebateDescriptionLabel,
keyboardType: 'default',
textContentType: 'none',
autoCompleteType: 'off',
autoCapitalize: 'none',
rules: {
required: texts.consul.startNew.emptyError,
minLength: { value: 10, message: 'ist zu kurz (minimum 10 Zeichen)' }
}
},
textContentType: 'none'
},
{
name: 'tagList',
multiline: true,
autoCapitalize: 'none',
autoCompleteType: 'off',
keyboardType: 'default',
label: texts.consul.startNew.tags,
maxHeight: 50,
multiline: true,
name: 'tagList',
placeholder: texts.consul.startNew.newDebateTagLabel,
keyboardType: 'default',
textContentType: 'none',
autoCompleteType: 'off',
autoCapitalize: 'none',
rules: { required: false }
rules: { required: false },
textContentType: 'none'
}
];

0 comments on commit 5a3bae6

Please sign in to comment.