Target only immediate children when determining if a tab should be hidden

Fixes #3627. This changes the logic for hiding tabs when all of their fields are hidden to specifically only target direct children of the tab pane when looking for visible fields because repeaters will have fields present that are only hidden by virtue of the parent field being hidden however the previous behaviour would consider it visible.
This commit is contained in:
Luke Towers 2018-07-05 10:14:41 -04:00
parent d52274bbb6
commit c55a7cd2e2
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@
$('.tab-pane', tabControl).each(function() { $('.tab-pane', tabControl).each(function() {
$('[data-target="#' + $(this).attr('id') + '"]', tabControl) $('[data-target="#' + $(this).attr('id') + '"]', tabControl)
.closest('li') .closest('li')
.toggle(!!$('.form-group:not(:empty):not(.hide)', $(this)).length) .toggle(!!$('> .form-group:not(:empty):not(.hide)', $(this)).length)
}) })
/* /*