Skip to content

Commit

Permalink
Use TextInput for Buffer input
Browse files Browse the repository at this point in the history
UndoTextInput is not needed when multiline input is enabled.

Also expect the TypeScript error for submitBehavior since it is missing
from the type declaration.
  • Loading branch information
mhoran committed Oct 29, 2024
1 parent e6c6097 commit a681c3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/usecase/buffers/ui/BufferContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
NativeSyntheticEvent,
StyleSheet,
Text,
TextInput,
TextInputSelectionChangeEventData,
TouchableOpacity,
View
Expand All @@ -23,7 +24,6 @@ import { renderWeechatFormat } from '../../../lib/weechat/color-formatter';
import { WeeChatProtocol } from '../../../lib/weechat/parser';
import { StoreState } from '../../../store';
import Buffer from './Buffer';
import UndoTextInput from '../../shared/UndoTextInput';
import UploadButton from './UploadButton';
import { clearBufferNotificationAction } from '../../../store/actions';

Expand Down Expand Up @@ -238,14 +238,15 @@ class BufferContainer extends React.Component<Props, State> {
clearNotification={this.clearNotification}
/>
<View style={styles.bottomBox}>
<UndoTextInput
<TextInput
style={styles.inputBox}
value={textValue}
onChangeText={this.handleChangeText}
onFocus={this.handleOnFocus}
onBlur={this.handleOnBlur}
onSelectionChange={this.handleSelectionChange}
returnKeyType="send"
// @ts-expect-error submitBehavior missing from TextInput type declaration
submitBehavior="submit"
onSubmitEditing={this.handleSubmit}
enablesReturnKeyAutomatically={true}
Expand Down

0 comments on commit a681c3f

Please sign in to comment.