Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jhk0530 opened this issue Feb 7, 2023 · 1 comment
Open

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

jhk0530 opened this issue Feb 7, 2023 · 1 comment

Comments

@jhk0530
Copy link

jhk0530 commented Feb 7, 2023

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.

@Mkranj
Copy link

Mkranj commented May 17, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants