Skip to content

Commit

Permalink
feat: Layout should provide an openWidget function (close #912)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Jul 31, 2024
1 parent ed48415 commit 584562c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/client/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,5 +382,11 @@ export const Layout = {
}
logger.debug(`[KDK] Unable to find the widget ${widget}`)
return { placement: undefined, window: undefined }
},
openWidget (widget) {
const { placement, window } = this.findWindow(widget)
if (!placement) return
if (window.current !== 'current') this.setWindowCurrent(placement, widget)
if (!window.visible) this.setWindowVisible(placement, true)
}
}

0 comments on commit 584562c

Please sign in to comment.