Skip to content

Commit b1c7236

Browse files
Merge pull request patternfly#419 from dabeng/master
Kebab menu should display menu on top when needed
2 parents 339a821 + cb908ae commit b1c7236

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/pages/_includes/widgets/list-view/list-view-standard-rows.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,21 @@
253253
</div>
254254
</div>
255255
<script>
256-
// Row Checkbox Selection
257256
$(document).ready(function () {
257+
// Row Checkbox Selection
258258
$("input[type='checkbox']").change(function (e) {
259259
if ($(this).is(":checked")) {
260260
$(this).closest('.list-group-item').addClass("active");
261261
} else {
262262
$(this).closest('.list-group-item').removeClass("active");
263263
}
264264
});
265+
// toggle dropdown menu
266+
$('.list-view-pf-actions').on('show.bs.dropdown', function () {
267+
var $this = $(this);
268+
var $dropdown = $this.find('.dropdown');
269+
var space = $(window).height() - $dropdown[0].getBoundingClientRect().top - $this.find('.dropdown-menu').outerHeight(true);
270+
$dropdown.toggleClass('dropup', space < 10);
271+
});
265272
});
266273
</script>

0 commit comments

Comments
 (0)