Skip to content

Commit

Permalink
fix(container): remove stickyHeader prop
Browse files Browse the repository at this point in the history
  • Loading branch information
yenbekbay committed Jul 30, 2019
1 parent d443c4a commit a2fad4e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ In addition to the regular `ScrollView`, `FlatList` or `SectionList` props, you

### Props

- [`stickyHeader`](#stickyHeader)
- [`stickyFooter`](#stickyFooter)
- [`containerStyle`](#containerStyle)

Expand All @@ -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.
Expand Down
5 changes: 0 additions & 5 deletions src/KeyboardAvoidingContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ViewStyle>;
}
Expand All @@ -50,7 +49,6 @@ export interface KeyboardAvoidingContainerProps<

export const KeyboardAvoidingContainer = genericMemo(
<TScrollViewProps extends ScrollViewProps>({
stickyHeader,
stickyFooter,
containerStyle,
ScrollViewComponent,
Expand All @@ -61,7 +59,6 @@ export const KeyboardAvoidingContainer = genericMemo(
}: KeyboardAvoidingContainerProps<TScrollViewProps>) => {
return (
<SafeAreaView style={[styles.container, containerStyle]}>
{stickyHeader}
<ScrollViewComponent ref={scrollViewRef} {...scrollViewProps} />
{stickyFooter && (
<View ref={stickyFooterRef} {...stickyFooterProps}>
Expand All @@ -76,7 +73,6 @@ export const KeyboardAvoidingContainer = genericMemo(
export function useKeyboardAvoidingContainerProps<
TScrollViewProps extends ScrollViewProps
>({
stickyHeader,
stickyFooter,
containerStyle,

Expand Down Expand Up @@ -397,7 +393,6 @@ export function useKeyboardAvoidingContainerProps<
);

return {
stickyHeader,
stickyFooter,
containerStyle,
scrollViewProps,
Expand Down

0 comments on commit a2fad4e

Please sign in to comment.