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

[Feature]: Ability to conditionally hide/show tabs based on user inputs #188

Open
1 task done
AlexPars opened this issue Sep 7, 2022 · 1 comment
Open
1 task done
Labels

Comments

@AlexPars
Copy link

AlexPars commented Sep 7, 2022

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Description

combination of semantic.dashboard + shiny.semantic delivers very powerful Shiny dashboards.

Tabs created are sidebar tabs (for example, using semantic.dashboard::dashboardSidebar and semantic.dashboard::sidebarMenu and semantic.dashboard::menuItem) and top bars (for example, using semantic.dashboard::tabBox and semantic.dashboard::box)

It would be very useful to be able to conditionally hide/show tabs (both on sidebar and on panels) based on user inputs

Problem

It allows tabs to be added/removed dynamically

Proposed Solution

I do not know.

I have seen approaches such as:
https://shiny.rstudio.com/reference/shiny/latest/showTab.html
https://deanattali.com/blog/advanced-shiny-tips/#hide-tab
https://stackoverflow.com/questions/33027756/hide-an-element-box-tabs-in-shiny-dashboard
https://rdrr.io/cran/fomantic.plus/man/tab_visibility.html
https://stackoverflow.com/questions/70085846/how-i-can-hide-a-tab-with-shinyjs

Alternatives Considered

I have tried approaches mentioned above

@osenan
Copy link
Contributor

osenan commented Sep 27, 2022

If you provide the id of the component you want to hide, for example with shinyjs::hide you should be able to hide and element and show it again with shinyjs::show. Only if a component does not have id we would need a different solution and maybe we would need to develop a new feature to include the id. I will change the category as a question. I will do some research on the cases you mention and if with any case there is not a simple JS solution I will create an issue for it.

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

No branches or pull requests

2 participants