RedGiant
RedGiant

Reputation: 4748

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

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>

    )
  }
}

Upvotes: 1

Views: 855

Answers (1)

Oleksandr Fediashov
Oleksandr Fediashov

Reputation: 4335

The active prop for Sticky component is available from 0.73.1.

Upvotes: 1

Related Questions