shinydashboardPlus icon indicating copy to clipboard operation
shinydashboardPlus copied to clipboard

sidebar's width & header's titlewidth not work for me

Open jhk0530 opened this issue 2 years ago • 1 comments

Hi, thanks for nice package.

I want to change sidebar's width. so i tried change titleWidth value in dashboardHeader and dashboardSidebar.

However, they didn't work, so I have to manually implement css to change width.

Anyway here's description.


Both code returns same result which doesn't contain any information about given titleWidth value

shinydashboardPlus::dashboardHeader(titleWidth = 300)
shinydashboardPlus::dashboardHeader(titleWidth = 400)
<header class="main-header">
  <span class="logo hidden-xs"></span>
  <nav class="navbar navbar-static-top" role="navigation">
    <span style="display:none;">
      <i class="fas fa-bars" role="presentation" aria-label="bars icon"></i>
    </span>
    <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
      <span class="sr-only">Toggle navigation</span>
    </a>
    <div class="navbar-custom-menu" style="float: left; margin-left: 10px;">
      <ul class="nav navbar-nav"></ul>
    </div>
    <div class="navbar-custom-menu">
      <ul class="nav navbar-nav">
        <li>
          <a href="#" data-toggle="control-sidebar">
            <i class="fas fa-gears" role="presentation" aria-label="gears icon"></i>
          </a>
        </li>
      </ul>
    </div>
  </nav>
</header>

Also these code returns, same result.

shinydashboardPlus::dashboardSidebar(width = 300)
shinydashboardPlus::dashboardSidebar(width = 400)
<aside id="sidebarCollapsed" class="main-sidebar" data-minified="true" data-collapsed="false">
  <section id="sidebarItemExpanded" class="sidebar"></section>
</aside>

my package version is 2.0.4.9000

Thanks.

jhk0530 avatar Feb 07 '23 03:02 jhk0530

If you're loading libraries like so:

library(shinydashboard) library(shinydashboardPlus) Try doing it like so:

library(shinydashboardPlus) library(shinydashboard)

Maybe NOT overwriting the older versions will help? It did for me, I had trouble with the box() function not accepting the height argument. Without an error, it just didn't do anything. And some other things were fixed this way...

Mkranj avatar May 17 '23 13:05 Mkranj