My question is exactly the same as what Maxime asked in r studio community. I have run into a similar issue with my work.
Since there was no response in that community, I'll repost Maxime's question here.
Hello R users,
I have a lot of hidden menuItems when I launch my shiny App. Some of
them are going to be shown when some buttons are clicked and some
other conditions met.
Everything ran as expected but I would like that the active menuItem
is highlighted on the sidebar. This is the case with the home page
that is never hidden but with all the hidden (from shinyjs package)
menuItems, once I show them, the menuItem is not highlighted when it
is active.
Anyone has a relatively easy solution for that?
Example of what the sidebar codes can look like:
in the UI for the sidebar:
sidebarMenu(id = "tabs",
shinyjs::useShinyjs(),
menuItem("Product Selection", tabName = "product_selection", icon = icon("dashboard")),
shinyjs::hidden(
div(id="Test",
menuItem("Test", tabName = "Test", icon = icon("chart-line"))))
)
in the server for the sidebar action:
observeEvent(input$look, {ID = someID shinyjs::show(id= ID,anim = TRUE)
updateTabItems(session, "tabs", ID) })
Have a nice day,
Maxime
Related
I have a NavigationView showing a title with the number of records in a List:
.navigationTitle("\(navBarTitle) (\(String(numberOfRecords)))")
In the toolbar I have 2 buttons:
show Unread - only show unread / show all
show Favorites - only show favorites / show all
The List view shows either All records, Unread records or Favorite records. Switching between Views using the buttons works fine and updates the navigation title numberOfRecords variable.
All is well sofar. Now...
Rows in the list have a NavigationLink that goes to a detail view:
NavigationLink(destination: detailView(record: record))
In the detail view I have a button: make card favorite. I click the button, but when returning to the list view, the numberOfRecords variable in the navigation title is not updated.
How can I update the navigation title from its detail view?
Thank you!
I have a main window which calls a modal bootstrap window after clicking a edit button.
After working in the modal window, I would like to execute a Oracle procedure, but it is closing my window.
So, I would like to know if there is any option to avoid closing bootstrap modal window after clicking a submit type button?
Thanks in advance.
Kind regards,
Francisco Mtz.
Cerrar
Generar Combinaciones
Actualizar
var partidos = document.getElementById('laluz_32quinielas_1prono_editmodal');
partidos.addEventListener('submit', function(e) {
e.preventDefault();
})
</script>
I tried to hide the x on the upper right-hand corner of my modal dialog window using both css and JQuery but nothing owrks. I tries using dynamic action on page load:
$("button.ui-button.ui-corner-all.ui-widget.ui-button-icon-only.ui-dialog-titlebar-close").hide();
and to use css:
button.ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-icon-only.ui-dialog-titlebar-close
{
visibility: hidden !important;
}
for my inline css but neither worked, the x still shows up
The div where this button is showed is rendered in the parent page, so to get it in the modal page, you need to add "parent" in the beginning of your javarscript.
try this:
var button = parent.$('.ui-dialog-titlebar-close'); //get the button
button.hide(); //hide the button
So my boss was requesting for me to have the accordions only clickable based on the course title: and not the labels or the rest of the row http://new.omegadesignla.com/courses/math.php
would this even be possible and would it even be worth the work? How would this even be done? I'm assuming i'd have to edition the foundation.js file for the accordion section.
Optional Javascript Configuration
JS
$(document).foundation({
accordion: {
// specify the class used for accordion panels
content_class: 'content',
// specify the class used for active (or open) accordion panels
active_class: 'active',
// allow multiple accordion panels to be active at the same time
multi_expand: false,
// allow accordion panels to be closed by clicking on their headers
// setting to false only closes accordion panels when another is opened
toggleable: true
}
});
i have two tab bar items with two different table view with navigation controllers.
by clicking on the tab1--- table1 is opening...Good. but when i did select on table1 it goes to the another view (table did select view)....every thing is good.
but the problem here is
when i am clicking on tab2 ----table 2 is opening....Good.
But again clicking on tab1------ it is not loading the table1....it is loading (table did select view) view. As the last time i left it there.
i want to open table1----on clicking on tab1......by programming.
help me
That is the expected behaviour if you are using the tab bar controller and the navigation controller in the item of the tab bar. User will expect the tab to retain the state of the view.
If you still want to enforce the app to go back to the root view controller of the navigation controller when user goes back to the tab, you can implement the UITabBarControllerDelegate tabBarController:didSelectViewController: method. What this delegate method does is:
Tells the delegate that the user selected an item in the tab bar.
Then call the method of UINavigationController called popToRootViewControllerAnimated: when user tap on the tab. This will help you to:
Pops all the view controllers on the stack except the root view
controller and updates the display.
For example:
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
if(viewController == yourNavigationController) {
UINavigationController *navigationController = (UINavigationController *)viewController;
[navigationController popToRootViewControllerAnimated:NO];
}
}