Skip to content

Commit 128df6a

Browse files
committed
Fix rstudio#725: Tabs with icons give incorrect values
When no explicit value argument was present on tabPanel, the inner text of the HTML anchor was used. This gave weird results when an icon was used, since it appears in the anchor. The fix is to always use the value parameter, defaulting it to the title.
1 parent 7b76951 commit 128df6a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/bootstrap.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ dateRangeInput <- function(inputId, label, start = NULL, end = NULL,
14041404
#' )
14051405
#' )
14061406
#' @export
1407-
tabPanel <- function(title, ..., value = NULL, icon = NULL) {
1407+
tabPanel <- function(title, ..., value = title, icon = NULL) {
14081408
divTag <- div(class="tab-pane",
14091409
title=title,
14101410
`data-value`=value,

man/tabPanel.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
\alias{tabPanel}
55
\title{Create a tab panel}
66
\usage{
7-
tabPanel(title, ..., value = NULL, icon = NULL)
7+
tabPanel(title, ..., value = title, icon = NULL)
88
}
99
\arguments{
1010
\item{title}{Display title for tab}

0 commit comments

Comments
 (0)