Skip to content

Commit

Permalink
@gogonzo comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Jan 10, 2025
1 parent f5cf6a5 commit 8f761d4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ modify_title <- function(
id = "teal-title",
build_app_title(title, favicon)
)
ui_tq <- do.call(app$ui, c(list(request = request), args)) |>
htmltools::tagQuery()
ui_tq <- htmltools::tagQuery(do.call(app$ui, c(list(request = request), args)))

ui_tq$find("#teal-title")$replaceWith(args$title)$allTags()
}
res
Expand Down Expand Up @@ -318,8 +318,7 @@ modify_header <- function(app, header = tags$p()) {
res$ui <- function(request, ...) {
args <- list(...)
args$header <- header
ui_tq <- do.call(app$ui, c(list(request = request), args)) |>
htmltools::tagQuery()
ui_tq <- htmltools::tagQuery(do.call(app$ui, c(list(request = request), args)))
ui_tq$find("#teal-header")$replaceWith(tags$header(id = "teal-header", args$header))$allTags()
}
res
Expand All @@ -345,8 +344,7 @@ modify_footer <- function(app, footer = tags$p()) {
res$ui <- function(request, ...) {
args <- list(...)
args$footer <- footer
ui_tq <- do.call(app$ui, c(list(request = request), args)) |>
htmltools::tagQuery()
ui_tq <- htmltools::tagQuery(do.call(app$ui, c(list(request = request), args)))
ui_tq$find("#teal-footer")$replaceWith(tags$div(id = "teal-footer", args$footer))$allTags()
}
res
Expand Down

0 comments on commit 8f761d4

Please sign in to comment.