Skip to content

Commit

Permalink
v1.5.0: added scrollToEndIndicator.
Browse files Browse the repository at this point in the history
  • Loading branch information
chubillkelvin committed Jan 2, 2020
1 parent 16c49e7 commit c983d61
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 26 deletions.
11 changes: 11 additions & 0 deletions build/dist/Triangle.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
interface Props {
size: number;
color: string;
direction: "up" | "down" | "left" | "right";
}
export default class Triangle extends React.PureComponent<Props> {
static defaultProps: Pick<Props, "size" | "color" | "direction">;
render(): JSX.Element;
}
export {};
41 changes: 41 additions & 0 deletions build/dist/Triangle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/dist/Triangle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions build/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { FlatListProps, StyleProp, TextStyle, ViewStyle } from "react-native";
import { FlatListProps, StyleProp, ViewStyle } from "react-native";
/**
* An enhanced React Native <FlatList> component to provide auto-scrolling functionality.
* Auto-scrolling will only be enabled if:
Expand All @@ -12,14 +12,17 @@ interface Props<T> extends FlatListProps<T> {
showScrollToEndIndicator: boolean;
newMessageAlertRenderer?: (newMessageCount: number) => string;
indicatorContainerStyle?: StyleProp<ViewStyle>;
indicatorTextStyle?: StyleProp<TextStyle>;
indicatorComponent?: React.ComponentType<any> | React.ReactElement | null;
}
export default class AutoScrollFlatList<T> extends React.PureComponent<Props<T>> {
interface State {
enabledAutoScrollToEnd: boolean;
}
export default class AutoScrollFlatList<T> extends React.PureComponent<Props<T>, State> {
static defaultProps: Pick<Props<any>, "threshold" | "showScrollToEndIndicator">;
constructor(props: Props<T>);
private readonly listRef;
private flatListHeight;
private contentHeight;
private enabledAutoScrollToEnd;
/**
* Exposing FlatList Methods To AutoScrollFlatList's Ref
*/
Expand Down Expand Up @@ -55,6 +58,7 @@ export default class AutoScrollFlatList<T> extends React.PureComponent<Props<T>>
private onLayout;
private onContentSizeChange;
private onScroll;
private renderDefaultIndicatorComponent;
render(): JSX.Element;
}
export {};
54 changes: 40 additions & 14 deletions build/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-autoscroll-flatlist",
"version": "1.4.1",
"version": "1.5.0",
"description": "An enhanced React Native FlatList component to provide auto-scrolling functionality",
"author": "Kelvin Chu <chubillkelvin@gmail.com> (github.com/RageBill)",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"react": "16.11.0",
"react-native": "0.61.2",
"react-native-autoscroll-flatlist": "1.4.1"
"react-native-autoscroll-flatlist": "1.5.0"
},
"devDependencies": {
"@types/react": "*",
Expand Down
8 changes: 4 additions & 4 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5360,10 +5360,10 @@ react-lifecycles-compat@^3.0.0:
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==

react-native-autoscroll-flatlist@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/react-native-autoscroll-flatlist/-/react-native-autoscroll-flatlist-1.4.1.tgz#28f7c2428e5d185f937278663af43addb613ae07"
integrity sha512-pE7g/du/kbcRXFxyR2g6t7dbUAc4Tvc0k1I7z6kG4CgJGqJv/Op8J1txLvm2UhVTbbBpEL4bAGQ0Zd9d9nq18Q==
react-native-autoscroll-flatlist@1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/react-native-autoscroll-flatlist/-/react-native-autoscroll-flatlist-1.5.0.tgz#aac1b5fc8ae9caa1aeb6125433283df9a966cebd"
integrity sha512-A2kXdCX/SU1jZXntKCzIkkDiywTOuY/CdGmIYspSvbsHbJBQGW2aUHA7l53yPsNGYXpeFAmKHpAZeiYD3VzPeg==

react-native-scripts-ts@1.7.0:
version "1.7.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-autoscroll-flatlist",
"version": "1.4.1",
"version": "1.5.0",
"description": "An enhanced React Native FlatList component to provide auto-scrolling functionality",
"author": "Kelvin Chu <chubillkelvin@gmail.com> (github.com/RageBill)",
"license": "MIT",
Expand Down

0 comments on commit c983d61

Please sign in to comment.