1
我找不到在sticky document像isActive
的道具,可以禁用粘性容易像react-sticky。是否有可能在Semantic-UI-React中做到这一点? 我试图使context
道具Sticky
空,但是它仍然粘时滚动。方式暂时语义的UI反应的禁用粘?
置顶代码:
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>
)
}
}
如果没有选项来禁用它,我认为你必须实现自己。你从'isActive'期待什么行为? –
我已添加PR,我认为它会很快合并并发布,https://github.com/Semantic-Org/Semantic-UI-React/pull/2053 –
@AlexanderFedyashov,谢谢,期待合并。该'active'道具会派上用场的时候我想在某些页面禁用粘头,但保持它在其他人。 – RedGiant