File tree Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ const Channel = (props) => {
3535 channel,
3636 children,
3737 disableIfFrozenChannel = true ,
38- disableKeyboardCompatibleView = false ,
3938 emojiData = emojiDataDefault ,
4039 EmptyStateIndicator = EmptyStateIndicatorDefault ,
4140 KeyboardCompatibleView = KeyboardCompatibleViewDefault ,
@@ -518,8 +517,17 @@ const Channel = (props) => {
518517 return < LoadingIndicator listType = 'message' /> ;
519518 }
520519
520+ const {
521+ disableKeyboardCompatibleView,
522+ keyboardBehavior,
523+ keyboardVerticalOffset,
524+ } = props ;
521525 return (
522- < KeyboardCompatibleView enabled = { ! disableKeyboardCompatibleView } >
526+ < KeyboardCompatibleView
527+ behavior = { keyboardBehavior }
528+ enabled = { ! disableKeyboardCompatibleView }
529+ keyboardVerticalOffset = { keyboardVerticalOffset }
530+ >
523531 < ChannelContext . Provider value = { channelContext } >
524532 < MessagesContext . Provider value = { messagesContext } >
525533 < ThreadContext . Provider value = { threadContext } >
Original file line number Diff line number Diff line change 11// TypeScript Version: 2.8
22
33import * as React from 'react' ;
4- import { FlatList , GestureResponderEvent } from 'react-native' ;
4+ import {
5+ FlatList ,
6+ GestureResponderEvent ,
7+ KeyboardAvoidingViewProps ,
8+ } from 'react-native' ;
59import * as Client from 'stream-chat' ;
610import * as SeamlessImmutable from 'seamless-immutable' ;
711import * as i18next from 'i18next' ;
@@ -206,6 +210,8 @@ export interface ChannelProps
206210 * />
207211 */
208212 KeyboardCompatibleView ?: React . ElementType < KeyboardCompatibleViewProps > ;
213+ keyboardVerticalOffset ?: number ;
214+ keyboardBehavior ?: 'height' | 'position' | 'padding' ;
209215 disableIfFrozenChannel ?: boolean ;
210216}
211217
@@ -1008,13 +1014,8 @@ export interface ImageUploadPreviewProps extends StyledComponentProps {
10081014 removeImage ?( id : string ) : void ;
10091015 retryUpload ?( id : string ) : Promise < any > ;
10101016}
1011- export interface KeyboardCompatibleViewProps extends StyledComponentProps {
1012- // Default: 500
1013- keyboardDismissAnimationDuration ?: number ;
1014- // Default: 500
1015- keyboardOpenAnimationDuration ?: number ;
1016- enabled ?: boolean ;
1017- }
1017+ export interface KeyboardCompatibleViewProps
1018+ extends KeyboardAvoidingViewProps { }
10181019
10191020export interface EmptyStateIndicatorProps extends StyledComponentProps {
10201021 listType ?: listType ;
You can’t perform that action at this time.
0 commit comments