feat(lab): Close navigation on mobile when switching view in workbench
This commit is contained in:
parent
c3e54687fc
commit
c3b9c07236
2 changed files with 3 additions and 1 deletions
|
@ -64,7 +64,7 @@ const LayoutWrapper = ({ app, title=false, children=[] }) => {
|
|||
const startNavigation = () => {
|
||||
app.startLoading()
|
||||
// Force close of menu on mobile if it is open
|
||||
if (app.primaryNavigation) app.setPrimaryNavigation(false)
|
||||
if (app.primaryMenu) app.setPrimaryMenu(false)
|
||||
}
|
||||
|
||||
const router = useRouter()
|
||||
|
|
|
@ -86,6 +86,8 @@ const WorkbenchWrapper = ({ app, pattern, preload=false, from=false, layout=fals
|
|||
const newGist = {...gist}
|
||||
set(newGist, path, content)
|
||||
setGist(newGist)
|
||||
// Force close of menu on mobile if it is open
|
||||
if (app.primaryMenu) app.setPrimaryMenu(false)
|
||||
}
|
||||
const unsetGist = (path) => {
|
||||
const newGist = {...gist}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue