-
Couldn't load subscription status.
- Fork 699
Closed
Labels
Feature RequestRequest for or introduction of new functionalityRequest for or introduction of new functionality
Milestone
Description
I suggest adding an onActive prop to slides that can be passed a callback that will be called when the slide is brought into view. This callback would be called with the slide number.
My use case is that I am altering the parent component of the Slide when a slide comes into view and need to know when and what slide is in view.
Calling the callback with the slide number may not be the best option.
Example
class extends Component {
onActive(slideNumber) {
console.log("The active slide is " + slideNumber)
}
render() {
return (
<Deck>
<Slide onActive={this.onActive} />
<Slide onActive={this.onActive} />
</Deck>
)
}
}Metadata
Metadata
Assignees
Labels
Feature RequestRequest for or introduction of new functionalityRequest for or introduction of new functionality