Shinydashboard: Is it not possible to have nested menu sub items? Can't make it work

ε祈祈猫儿з 提交于 2019-12-03 05:58:27

It works if you only use menuSubItem as the lowest level, and call the others menuItem. Will that work for your purposes?

sidebar <- dashboardSidebar(
sidebarMenu(id = 'sidebarmenu',
            menuItem('x', tabName = 'x', icon = icon('line-chart')),
            menuItem('y', tabName = 'y',
                     icon = icon('line-chart'),
                     menuItem('a',
                                 tabName = 'a',
                                 icon = icon('line-chart')),
                     menuItem('b',
                                 tabName = 'b',
                                 icon = icon('line-chart'),
                                 menuSubItem('l',
                                             tabName = 'l',
                                             icon = icon('line-chart')),
                                 menuSubItem('m',
                                             tabName = 'm',
                                             icon = icon('line-chart'))),
                     menuItem('c',
                                 tabName = 'c',
                                 icon = icon('line-chart'))
            )))
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!