mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-07 05:04:58 +08:00
fix(calendar): today correctly jumps to this week
This commit is contained in:
parent
dc5210275e
commit
f13e30feaa
1 changed files with 3 additions and 1 deletions
|
@ -74,6 +74,8 @@ export default class WeekView extends React.Component {
|
|||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
const weekStart = moment(this.state.startMoment).add(BUFFER_DAYS, 'days').unix()
|
||||
this._scrollTime = weekStart
|
||||
this._ensureHorizontalScrollPos()
|
||||
}
|
||||
|
||||
|
@ -230,7 +232,7 @@ export default class WeekView extends React.Component {
|
|||
|
||||
_headerComponents() {
|
||||
const left = (
|
||||
<button key="today" className="btn" onClick={this._onClickToday} style={{order: -100}}>
|
||||
<button key="today" className="btn" onClick={this._onClickToday} style={{position: 'absolute', left: 10}}>
|
||||
Today
|
||||
</button>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue