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
Active tab fails to display on init when menu and tabs are dynamically generated #319
Comments
|
Interestingly if you change the outputID in ui and the output$body to text other than "body", it works. not sure why.
|
|
@kevin041811 That's an interesting observation. It made me think that it has something to do with the fact that "body" is also an HTML tag, so I tried a few other examples.
I'm thinking there is some fuzzy-matching logic going on somewhere that is looking for HTML tags or something like HTML tags, but I'm not sure. For instance, I don't know why body2 works but div2 does not. |
|
This looks very similar to what I've reported earlier today (#335), might be a duplicate. |
|
Hello, Thanks ahead of time for your help :) |
|
I'm having a similar problem, except my UI isn't dynamically generated--but even when I add a static UI component as a menuSubitem or just by itself under one of the menuItems, the selected tab does not display on init. I posted about this issue here on RStudio community, along with a reproducible UI example. Is there a fix for this yet? Thank you! |
|
Have a look at #71, basically adding should do the trick with |
|
Thank you so much for the response @homer3018! You're right that this fix works really well to get the menuItem to display initially (which is awesome). However, for some reason the menuItem still doesn't read as "selected" from the server's point of view, which means that when I write other code that depends on |
|
I answered the above here. |
This is a similar case to #71, but when the body of the dashboard is also dynamically generated the app fails to display the content of the first tab, even when
selected = TRUE.Session info:
I dug into the HTML and it looks like it recognizes that the tab should be active, based on the class of the item in the sidebar menu (
<li class="active">).But when I inspect the actual panel:
I find that it has class "tab-pane" when I think the class should be "active" based on the css (this is line 4137-4142 from bootstrap.css):
from the following version of bootstrap:
The text was updated successfully, but these errors were encountered: