Having an issue with using Bootstrap 4, particularly reactstrap but the problem can be recreated in regular Bootstrap, where I am utilizing 'card-columns' to make a grid of cards, each card containing a dropdown menu in the 'card-footer'. The issue arises when there are 4 or more cards as the dropdown appears to break across columns somehow....with its position varying from where Chrome highlights the element, as depicted in this image:
https://i.sstatic.net/v96bk.png
If I increase the card count and open the dropdown on some cards, they change positions - seemingly 'jumping around'.
Here is a basic example:
body {
margin: 10px;
}
.dropdown-menu {
margin-top: 10px;
margin-bottom: 10px;
}
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container-fluid h-100">
<div class="mx-4 my-2 row">
<div class="mx-4 row">
<div class="card-columns">
<div class="card border-secondary">
<div class="card-footer">
<div class="row">
<div class="col-md-8">
<div class="btn-group show">
<button class="dropdown-toggle btn btn-outline-secondary">
More
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card border-secondary">
<div class="card-footer">
<div class="row">
<div class="col-md-8">
<div class="btn-group show">
<button class="dropdown-toggle btn btn-outline-secondary">
More
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card border-secondary">
<div class="card-footer">
<div class="row">
<div class="col-md-8">
<div class="btn-group show">
<button class="dropdown-toggle btn btn-outline-secondary">
More
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card border-secondary">
<div class="card-footer">
<div class="row">
<div class="col-md-8">
<div class="btn-group show">
<button class="dropdown-toggle btn btn-outline-secondary">
More
</button>
<div role="menu" class="dropdown-menu show" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 27px, 0px);" data-placement="bottom-start">
<button class="dropdown-item">
Button 1
</button>
<button class="dropdown-item">
Button 2
</button>
<button class="dropdown-item">
Button 3
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card border-secondary">
<div class="card-footer">
<div class="row">
<div class="col-md-8">
<div class="btn-group show">
<button class="dropdown-toggle btn btn-outline-secondary">
More
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
In this instance, only the last 2 buttons of the menu seem to appear elsewhere than intended - the viewport must be wide enough to display more than 1 column for this issue to manifest.
The problem likely stems from the dropdown extending beyond the cards' boundaries when opened, despite being absolutely positioned.
How can I create such a dropdown without disrupting the card-columns layout?