Ways to temporarily disable sticky in Semantic-UI-React?

844 Views Asked by At

I can't find a prop like isActive in the sticky document that can disable the sticky easily like react-sticky. Is it possible to do that in Semantic-UI-React sticky ? I've tried making the context props null in Sticky, but it's still sticky when scroll.

Sticky code:

export default class StickyAdjacentContextExample extends Component {
  state = {}
  handleContextRef = contextRef => this.setState({ contextRef })

  render() {
    const { contextRef } = this.state

    return (
       <div ref={this.handleContextRef}>
             <Sticky context={contextRef}>
                  <Header as='h3'>Stuck Content</Header>
                  <Image src='/assets/images/wireframe/image.png' />
                </Sticky>
       </div>

    )
  }
}
1

There are 1 best solutions below

0
On BEST ANSWER

The active prop for Sticky component is available from 0.73.1.