From f30d278cf1a935743e4600515f23d7b869fec642 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Mon, 25 Jun 2018 11:39:17 -0400 Subject: [PATCH] Revert "MM-10822 Change post textbox to only be partially connected" (#1820) This reverts commit 3703309fad1b73b9b70b8816d0253fb2c7046939. --- app/components/post_textbox/post_textbox.js | 5 +- app/components/quick_text_input.js | 86 --------------------- 2 files changed, 2 insertions(+), 89 deletions(-) delete mode 100644 app/components/quick_text_input.js diff --git a/app/components/post_textbox/post_textbox.js b/app/components/post_textbox/post_textbox.js index 38c425355..a6f5cddc6 100644 --- a/app/components/post_textbox/post_textbox.js +++ b/app/components/post_textbox/post_textbox.js @@ -3,7 +3,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {Alert, BackHandler, Keyboard, Platform, Text, TouchableOpacity, View} from 'react-native'; +import {Alert, BackHandler, Keyboard, Platform, Text, TextInput, TouchableOpacity, View} from 'react-native'; import {intlShape} from 'react-intl'; import {RequestStatus} from 'mattermost-redux/constants'; import EventEmitter from 'mattermost-redux/utils/event_emitter'; @@ -11,7 +11,6 @@ import EventEmitter from 'mattermost-redux/utils/event_emitter'; import AttachmentButton from 'app/components/attachment_button'; import Autocomplete from 'app/components/autocomplete'; import FileUploadPreview from 'app/components/file_upload_preview'; -import QuickTextInput from 'app/components/quick_text_input'; import {INITIAL_HEIGHT, INSERT_TO_COMMENT, INSERT_TO_DRAFT, IS_REACTION_REGEX, MAX_CONTENT_HEIGHT, MAX_FILE_COUNT} from 'app/constants/post_textbox'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -495,7 +494,7 @@ export default class PostTextbox extends PureComponent { {!channelIsReadOnly && attachmentButton} - { - if (!this.input) { - return; - } - - this.input.setNativeProps({text: this.props.value}); - } - - get value() { - return this.input.value; - } - - set value(value) { - this.input.setNativeProps({text: this.props.value}); - } - - focus() { - this.input.focus(); - } - - blur() { - this.input.blur(); - } - - getInput = () => { - return this.input; - }; - - setInput = (input) => { - this.input = input; - } - - render() { - const {value, ...props} = this.props; - - Reflect.deleteProperty(props, 'delayInputUpdate'); - - // Only set the defaultValue since the real one will be updated using componentDidUpdate if necessary - return ( - - ); - } -}