-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing message bar, refactore input bindings + doc tweaks
- Loading branch information
1 parent
7841499
commit 0748fda
Showing
17 changed files
with
203 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
library(shiny) | ||
library(shinyMobile) | ||
|
||
app <- shinyApp( | ||
ui = f7Page( | ||
title = "Update message bar", | ||
f7SingleLayout( | ||
navbar = f7Navbar( | ||
title = "Message bar", | ||
hairline = FALSE, | ||
shadow = TRUE | ||
), | ||
toolbar = f7Toolbar( | ||
position = "bottom", | ||
f7Link(label = "Link 1", href = "https://www.google.com"), | ||
f7Link(label = "Link 2", href = "https://www.google.com") | ||
), | ||
# main content | ||
f7Segment( | ||
container = "segment", | ||
f7Button("updateMessageBar", "Update value"), | ||
f7Button("updateMessageBarPlaceholder", "Update placeholder") | ||
), | ||
f7MessageBar(inputId = "mymessagebar", placeholder = "Message"), | ||
uiOutput("messageContent") | ||
) | ||
), | ||
server = function(input, output, session) { | ||
output$messageContent <- renderUI({ | ||
req(input$mymessagebar) | ||
tagList( | ||
f7BlockTitle("Message Content", size = "large"), | ||
f7Block(strong = TRUE, inset = TRUE, input$mymessagebar) | ||
) | ||
}) | ||
observeEvent(input$updateMessageBar, { | ||
updateF7MessageBar( | ||
inputId = "mymessagebar", | ||
value = "sjsjsj" | ||
) | ||
}) | ||
observeEvent(input$updateMessageBarPlaceholder, { | ||
updateF7MessageBar( | ||
inputId = "mymessagebar", | ||
placeholder = "Enter your message" | ||
) | ||
}) | ||
} | ||
) | ||
|
||
if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.