-
Notifications
You must be signed in to change notification settings - Fork 15
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
Pricing Table Reactivity non-existent #18
Comments
Hi, thanks for your interest in shinybulma. For now, the pricing table is not interactive. What you could to is to add an id to the given button as well as add the action-button class to make it react like a classic shiny action button. On the server side, you may detect any click on that button using the corresponding inputId in an observeEvent. In a future release, this will be included by default. For now, the reason it was not done is mainly a lack of free time to maintain the package. Best David |
Hey @DivadNojnarg! Would you be able to provide a very quick example of what you described above? I am currently working with Thanks in advance! |
Actually, nevermind.. I am going to use |
You would have to modify the bulmaPricingPlan <- function(..., active = FALSE, color = NULL, plan_title = NULL,
plan_price = NULL, plan_currency = NULL,
plan_period = NULL, button_status = NULL,
button_name = NULL, id = NULL) {
cl <- "pricing-plan"
if (!is.null(color)) cl <- paste0(cl, " is-", color)
if (active == TRUE) cl <- paste0(cl, " is-active")
# main tag
pricingPlanTag <- shiny::tags$div(
class = cl
)
# header
headerTag <- shiny::tags$div(class = "plan-header", plan_title)
# price
priceTag <- shiny::tags$div(
class = "plan-price",
shiny::tags$span(
class = "plan-price-amount",
shiny::tags$span(class = "plan-price-currency", plan_currency),
plan_price
),
plan_period
)
# items
itemsTag <- shiny::tags$div(
class = "plan-items",
# items
...
)
# footer
footerTag <- shiny::tags$div(
class = "plan-footer"
)
# footer button
footerButtonTag <- shiny::tags$button(
id = id,
class = "button action-button is-fullwidth",
button_name
)
if (!is.null(button_status)) footerButtonTag$attribs$disabled <- button_status
footerTag <- shiny::tagAppendChild(footerTag, footerButtonTag)
pricingPlanTag <- shiny::tagAppendChildren(
pricingPlanTag,
headerTag,
priceTag,
itemsTag,
footerTag
)
pricingPlanTag
} |
Hi @DivadNojnarg, this is perfect! I am going to give it a try again, really like |
I love the look of this package, but when I try to use the pricing table defaults from the documentation, there is no reactivity at all. Clicking a button in the bulmaPricingPlanItem seems to do absolutely nothing. Am I missing something here?
bulmaPricingPlan( active = TRUE, color = NULL, plan_title = "Growing Team", plan_price = 60, plan_currency = "$", plan_period = "/month", button_status = NULL, button_name = "Choose", bulmaPricingPlanItem(name = "200GB Storage"), bulmaPricingPlanItem(name = "50 domains"), bulmaPricingPlanItem(name = "1TB Bandwidth"), bulmaPricingPlanItem(name = "100 Email Boxes") )
The text was updated successfully, but these errors were encountered: