Add givePageIndex() to provide the index of the scrolled page to a prop function#40
Merged
jfilter merged 2 commits intojfilter:masterfrom Oct 29, 2018
lowewenzel:master
Merged
Add givePageIndex() to provide the index of the scrolled page to a prop function#40jfilter merged 2 commits intojfilter:masterfrom lowewenzel:master
jfilter merged 2 commits intojfilter:masterfrom
lowewenzel:master
Conversation
Owner
|
Thanks for your work! I renamed the prop to ...
getPageIndex = (pageIndex) => {
this.setState({
pageIndex,
});
}
render() {
return (
<Onboarding pageIndexCallback={this.getPageIndex}
... |
|
I have a problem with this callback. const [pageIndex, setPageIndex] = useState(0);
const changePageHandler = (index) => {
setPageIndex(index);
}
<Onboarding pageIndexCallback={changePageHandler}
...
/>I get this warning: I also tried to wrap |
|
I have the same problem as @Luca8991. Did anyone find a solution? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example usage: