Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add horizontalScrollEnabled prop #37

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add horizontalScrollEnabled prop
  • Loading branch information
ThearchyHelios committed Dec 22, 2024
commit 9b51a27bf58e5946cf539df9fb48f4b0c627f12e
6 changes: 6 additions & 0 deletions .idea/codestream.xml

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

8 changes: 8 additions & 0 deletions .idea/workspace.xml

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

3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default class ScrollableTabView extends React.Component {
onScroll: PropTypes.func,
onScroll2Horizontal: PropTypes.func,
screenScrollThrottle: PropTypes.number,
horizontalScrollEnabled: PropTypes.bool,
errorToThrow: PropTypes.bool
};

Expand Down Expand Up @@ -109,6 +110,7 @@ export default class ScrollableTabView extends React.Component {
onScroll: null,
onScroll2Horizontal: null,
screenScrollThrottle: 60,
horizontalScrollEnabled: true,
errorToThrow: false
};

Expand Down Expand Up @@ -774,6 +776,7 @@ export default class ScrollableTabView extends React.Component {
onScrollIndexChanged={this._throttleCallback}
firstItem={this.state.checkedIndex}
onScroll={this._onScrollHandler2Horizontal}
scrollEnabled={this.props.horizontalScrollEnabled}
{...carouselProps}
/>
);
Expand Down