1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00

Fix: missing boardId state after showView

This commit is contained in:
Chen-I Lim 2020-10-19 12:44:26 -07:00
parent 982a8edfc5
commit d2a8f20390

View File

@ -175,6 +175,7 @@ export default class BoardPage extends React.Component<Props, State> {
this.setState({
...this.state,
boardTree,
boardId,
viewId: boardTree.activeView.id
})
Utils.log(`sync complete: ${boardTree.board.id} (${boardTree.board.title})`)
@ -197,7 +198,7 @@ export default class BoardPage extends React.Component<Props, State> {
showView(viewId: string) {
this.state.boardTree.setActiveView(viewId)
this.setState({ viewId, boardTree: this.state.boardTree })
this.setState({...this.state, viewId })
const newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + `?id=${encodeURIComponent(this.state.boardId)}&v=${encodeURIComponent(viewId)}`
window.history.pushState({ path: newUrl }, "", newUrl)
}