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>
)
}
}