So I have AppBar working fine. And I didn't even use sticky for that but I think I need some kind of sticky style to make my element in the page essentially stick at the top when the user scrolls. I essentially want this.
https://www.w3schools.com/howto/howto_css_sticky_element.asp
But within my React page I want my ProgressBar
component to remain at the top. The component below this RenderTeamSelections
which is a big table, it will push the ProgressBar
out of view quickly. I want to kept the ProgressBar
in view while the user makes selections from the table. Here is the relevant code.
return (
<div className={rootClassName}>
<div className="g-row">
<div className="g-col">
<AccountProfile {...this.props} />
<br />
<Team team={this.props.team} profileDetail={profileDetail} />
<br />
<ProgressBar {...this.props} />
<br />
<RenderTeamSelections {...this.props] />
</div>
</div>
</div>
);
I am familiar with the use of withStyles and have played with some settings on the position of ProgressBar
like 'fixed', 'sticky' and '-webkit-sticky' but have not gotten it to stick at the top when I scroll yet. Any help would be greatly appreciated. I didn't see anything Material docs that seemed to directly relate to this scenario.