From a2fad4ec67050a65f95336660f06459a1ecefb2e Mon Sep 17 00:00:00 2001 From: Ayan Yenbekbay Date: Tue, 30 Jul 2019 23:23:12 +0600 Subject: [PATCH] fix(container): remove `stickyHeader` prop --- README.md | 11 ----------- src/KeyboardAvoidingContainer.tsx | 5 ----- 2 files changed, 16 deletions(-) diff --git a/README.md b/README.md index 3b33da2..9bd7465 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ In addition to the regular `ScrollView`, `FlatList` or `SectionList` props, you ### Props -- [`stickyHeader`](#stickyHeader) - [`stickyFooter`](#stickyFooter) - [`containerStyle`](#containerStyle) @@ -48,16 +47,6 @@ In addition to the regular `ScrollView`, `FlatList` or `SectionList` props, you ## Props -### `stickyHeader` - -Used to display a persisted view above the scrollable content. - -| Type | Required | -| ----------------- | -------- | -| `React.ReactNode` | No | - ---- - ### `stickyFooter` Used to display a persisted view under the scrollable content. Sticky footer is always shown above the keyboard, which could be the desired behaviour for a submit button. diff --git a/src/KeyboardAvoidingContainer.tsx b/src/KeyboardAvoidingContainer.tsx index a51a538..1904120 100644 --- a/src/KeyboardAvoidingContainer.tsx +++ b/src/KeyboardAvoidingContainer.tsx @@ -29,7 +29,6 @@ const {height: SCREEN_HEIGHT} = Dimensions.get('window'); const KEYBOARD_PADDING = 48; export interface ExternalKeyboardAvoidingContainerProps { - stickyHeader?: React.ReactNode; stickyFooter?: React.ReactNode; containerStyle?: StyleProp; } @@ -50,7 +49,6 @@ export interface KeyboardAvoidingContainerProps< export const KeyboardAvoidingContainer = genericMemo( ({ - stickyHeader, stickyFooter, containerStyle, ScrollViewComponent, @@ -61,7 +59,6 @@ export const KeyboardAvoidingContainer = genericMemo( }: KeyboardAvoidingContainerProps) => { return ( - {stickyHeader} {stickyFooter && ( @@ -76,7 +73,6 @@ export const KeyboardAvoidingContainer = genericMemo( export function useKeyboardAvoidingContainerProps< TScrollViewProps extends ScrollViewProps >({ - stickyHeader, stickyFooter, containerStyle, @@ -397,7 +393,6 @@ export function useKeyboardAvoidingContainerProps< ); return { - stickyHeader, stickyFooter, containerStyle, scrollViewProps,