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:
parent
982a8edfc5
commit
d2a8f20390
@ -175,6 +175,7 @@ export default class BoardPage extends React.Component<Props, State> {
|
|||||||
this.setState({
|
this.setState({
|
||||||
...this.state,
|
...this.state,
|
||||||
boardTree,
|
boardTree,
|
||||||
|
boardId,
|
||||||
viewId: boardTree.activeView.id
|
viewId: boardTree.activeView.id
|
||||||
})
|
})
|
||||||
Utils.log(`sync complete: ${boardTree.board.id} (${boardTree.board.title})`)
|
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) {
|
showView(viewId: string) {
|
||||||
this.state.boardTree.setActiveView(viewId)
|
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)}`
|
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)
|
window.history.pushState({ path: newUrl }, "", newUrl)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user