Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tab input value updating for BS4 dropdowns #3412

Merged
merged 6 commits into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions inst/www/shared/shiny.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions inst/www/shared/shiny.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inst/www/shared/shiny.min.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions srcts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5958,10 +5958,11 @@ function main(): void {
},
getValue: function (el) {
// prettier-ignore
// The BS4+ selectors may not work as is for dropdowns within dropdowns, but BS3+ dropped support for those anyway
let anchor = isBS3()
schloerke marked this conversation as resolved.
Show resolved Hide resolved
? $(el).find("li:not(.dropdown).active > a")
: $(el).find(
".nav-link:not(.dropdown-toggle).active, .dropdown-menu > .dropdown-item.active"
".nav-link:not(.dropdown-toggle).active, .dropdown-menu .dropdown-item.active"
);

if (anchor.length === 1) return this._getTabName(anchor);
Expand All @@ -5974,10 +5975,11 @@ function main(): void {

if (value) {
// prettier-ignore
// The BS4+ selectors may not work as is for dropdowns within dropdowns, but BS3+ dropped support for those anyway
let anchors = isBS3()
schloerke marked this conversation as resolved.
Show resolved Hide resolved
? $(el).find("li:not(.dropdown) > a")
: $(el).find(
".nav-link:not(.dropdown-toggle), .dropdown-menu > .dropdown-item"
".nav-link:not(.dropdown-toggle), .dropdown-menu .dropdown-item"
);

anchors.each(function () {
Expand Down