Skip to content

Commit

Permalink
correctly toggle f7TabLink state (JS side)
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Apr 25, 2024
1 parent 9da3517 commit 5f462e1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion inst/examples/strava/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,22 @@ brochureApp(
# Common toolbar
toolbar = f7Toolbar(
icons = TRUE,
# Allow to show correct active state
# since this is not really a tab layout
tags$script(
"$(function(){
$('.tab-link').on('click', function() {
$(this).addClass('tab-link-active');
$('.tab-link').not(this).removeClass('tab-link-active');
});
});"
),
f7TabLink(
label = "Home",
icon = f7Icon("house"),
href = "/",
# TO be routable
class = "link"
class = "link tab-link-active"
),
f7TabLink(
label = "Maps",
Expand Down

0 comments on commit 5f462e1

Please sign in to comment.