1

isActive我在粘性文档中找不到像react-sticky这样可以轻松禁用粘性的道具。是否可以在 Semantic-UI-React sticky 中做到这一点?我试过让context道具为空Sticky,但滚动时它仍然很粘。

粘滞代码:

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>

    )
  }
}
4

1 回答 1

1

组件的activepropSticky可从0.73.1.

于 2017-09-18T07:22:10.473 回答