diff --git a/README.md b/README.md index db02100..7672876 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ npm i react-native-sortable-list --save - **contentContainerStyle?** (Object, Array) these styles will be applied to the inner scroll view content container - **innerContainerStyle?** (Object, Array) these styles will be applied to the inner scroll view content container, excluding the header and footer - **horizontal?** (boolean) when true, the SortableList's children are arranged horizontally in a row instead of vertically in a column. The default value is false. +- **showsVerticalScrollIndicator** (boolean) when false, the vertical scroll indicator will not be visible. The default value is true. +- **showsHorizontalScrollIndicator** (boolean) when false, the horizontal scroll indicator will not be visible. The default value is true. - **sortingEnabled?** (boolean) when false, rows are not sortable. The default value is true. - **scrollEnabled?** (boolean) when false, the content does not scrollable. The default value is true. - **manuallyActivateRows?** (bool) whether you intend to use the `toggleRowActive` method to activate a row or use the out of box solution. diff --git a/src/SortableList.js b/src/SortableList.js index 73fcf31..be7d2d0 100644 --- a/src/SortableList.js +++ b/src/SortableList.js @@ -23,6 +23,8 @@ export default class SortableList extends Component { sortingEnabled: PropTypes.bool, scrollEnabled: PropTypes.bool, horizontal: PropTypes.bool, + showsVerticalScrollIndicator: PropTypes.bool, + showsHorizontalScrollIndicator: PropTypes.bool, refreshControl: PropTypes.element, autoscrollAreaSize: PropTypes.number, rowActivationTime: PropTypes.number, @@ -41,7 +43,9 @@ export default class SortableList extends Component { sortingEnabled: true, scrollEnabled: true, autoscrollAreaSize: 60, - manuallyActivateRows: false + manuallyActivateRows: false, + showsVerticalScrollIndicator: true, + showsHorizontalScrollIndicator: true } /** @@ -180,7 +184,7 @@ export default class SortableList extends Component { } render() { - let {contentContainerStyle, innerContainerStyle, horizontal, style} = this.props; + let {contentContainerStyle, innerContainerStyle, horizontal, style, showsVerticalScrollIndicator, showsHorizontalScrollIndicator} = this.props; const {animated, contentHeight, contentWidth, scrollEnabled} = this.state; const containerStyle = StyleSheet.flatten([style, {opacity: Number(animated)}]) innerContainerStyle = [ @@ -205,6 +209,8 @@ export default class SortableList extends Component { contentContainerStyle={contentContainerStyle} scrollEventThrottle={2} scrollEnabled={scrollEnabled} + showsHorizontalScrollIndicator={showsHorizontalScrollIndicator} + showsVerticalScrollIndicator={showsVerticalScrollIndicator} onScroll={this._onScroll}> {this._renderHeader()}