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 = () => {
|
const startNavigation = () => {
|
||||||
app.startLoading()
|
app.startLoading()
|
||||||
// Force close of menu on mobile if it is open
|
// 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()
|
const router = useRouter()
|
||||||
|
|
|
@ -86,6 +86,8 @@ const WorkbenchWrapper = ({ app, pattern, preload=false, from=false, layout=fals
|
||||||
const newGist = {...gist}
|
const newGist = {...gist}
|
||||||
set(newGist, path, content)
|
set(newGist, path, content)
|
||||||
setGist(newGist)
|
setGist(newGist)
|
||||||
|
// Force close of menu on mobile if it is open
|
||||||
|
if (app.primaryMenu) app.setPrimaryMenu(false)
|
||||||
}
|
}
|
||||||
const unsetGist = (path) => {
|
const unsetGist = (path) => {
|
||||||
const newGist = {...gist}
|
const newGist = {...gist}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue