-
Steps to reproduce
Bug descriptionThe JS alert code is fired when the page is rendered and is not fired as expected when the user clicks on the Expected behaviorThe JS code would fire each time the user changes to a different CommentsIf the call to Relevant software versions: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @justacec, this is not a bug. Please take a look at this example: library(shiny)
library(shiny.fluent)
shinyApp(
ui = tagList(
textOutput("text"),
Pivot(
onLinkClick = JS('() => alert("Here")'),
PivotItem(id = "tab1", headerText = "Apples"),
PivotItem(id = "tab2", headerText = "Bananas")
)
),
server = function(input, output) {
}
) Converting the JS code passed to |
Beta Was this translation helpful? Give feedback.
Hi @justacec,
this is not a bug.
onLinkClick
is a prop that should be a function. Please take a look at the docs of this component.Please take a look at this example:
Converting the JS code passed to
onLinkClick
argument to a function should solve this issue. It works with bothfluentPage
andtagList
.