diff --git a/types/react-native-sortable-list/index.d.ts b/types/react-native-sortable-list/index.d.ts old mode 100644 new mode 100755 index 9b8e547b85..354176860f --- a/types/react-native-sortable-list/index.d.ts +++ b/types/react-native-sortable-list/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for react-native-sortable-list // Project: https://github.com/gitim/react-native-sortable-list -// Definitions by: Michael Sivolobov +// Definitions by: Michael Sivolobov ,Vince Maiuri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -51,6 +51,27 @@ interface SortableListProps { */ contentContainerStyle?: ViewStyle + /** + * these styles will be applied to the inner scroll view content container, excluding the header and footer + */ + innerContainerStyle?: ViewStyle + + /** + * when true, the SortableList's children are arranged horizontally in a row instead of vertically in a column. + * The default value is false. + */ + horizontal?: boolean + + /** + * when false, the vertical scroll indicator will not be visible. The default value is true. + */ + showsVerticalScrollIndicator?: boolean + + /** + * when false, the horizontal scroll indicator will not be visible. The default value is true. + */ + showsHorizontalScrollIndicator?: boolean + /** * when false, rows are not sortable. The default value is true. */ @@ -62,11 +83,44 @@ interface SortableListProps { scrollEnabled?: boolean /** - * Takes a row key, row index, data entry from the data source and its statuses disabled, - * active and should return a renderable component to be rendered as the row. + * whether you intend to use the toggleRowActive method to activate a row or use the out of box solution. + */ + manuallyActivateRows?: boolean + + /** + * determines the height for vertical list and the width for horizontal list of the area at the begining and + * the end of the list that will trigger autoscrolling. Defaults to 60. + */ + autoscrollAreaSize?: number + + /** + * determines time delay in ms before pressed row becomes active. Defaults to 200 ms. + */ + rowActivationTime?: number + + /** + * A RefreshControl that works the same way as a ScrollView's refreshControl. + */ + refreshControl?: JSX.Element + + /** + * Takes a row key, row index, data entry from the data source and its statuses disabled, active and should + * return a renderable component to be rendered as the row. The child component will receive a method called + * toggleRowActive (only if manuallyActivateRows={true}) to manually activate the row. Useful if you have + * multiple touch responders in your view. */ renderRow: (props: RowProps) => JSX.Element + /** + * Renders returned component at the top of the list. + */ + renderHeader?: () => JSX.Element + + /** + * Renders returned component at the bottom of the list. + */ + renderFooter?: () => JSX.Element + /** * Called when rows were reordered, takes an array of rows keys of the next rows order. */ @@ -81,6 +135,11 @@ interface SortableListProps { * Called when the active row was released. */ onReleaseRow?: (key: DataKey) => void + + /** + * Called when a row was pressed. + */ + onPressRow?: (key: DataKey) => void } interface SortableListStatic extends React.ClassicComponentClass {} @@ -88,4 +147,4 @@ interface SortableListStatic extends React.ClassicComponentClass