Repository navigation
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: |
Answered by
jakubsob
Mar 9, 2023
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 |
0 replies
Answer selected by
jakubsob
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi @justacec,
this is not a bug.
onLinkClickis 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
onLinkClickargument to a function should solve this issue. It works with bothfluentPageandtagList.