Skip to content

Commit

Permalink
fix(styles): allow ui-select overflow
Browse files Browse the repository at this point in the history
This commit allows the `uiSelect` to overflow on top of a modal,
provided that "append-to-body" is given as _true_.  This fixes the
overflow issues in the stock modal.

For further information, see:
https://github.com/angular-ui/ui-select/wiki/FAQs#how-do-i-stop-the-drop-down-from-getting-cut-off-by-the-bottom-of-my-bootstrap-modal--container-with-overflow-hidden
  • Loading branch information
jniles committed Sep 27, 2017
1 parent e337a20 commit 6df81ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions client/src/less/bhima-bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,9 @@ input[type=number] {-moz-appearance: textfield;}
box-shadow : 0px 2px 4px -4px black;
z-index : 1000;
}

/* hack to get ui-selects to overflow over bootstrap's modals with */
/* append-to-body="true" */
body > .ui-select-bootstrap.open {
z-index: 1100;
}
4 changes: 2 additions & 2 deletions client/src/modules/stock/movements/modals/search.modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ol>
</div>

<div class="modal-body">
<div class="modal-body" style="padding:0;">
<uib-tabset>
<uib-tab index="0" heading="{{'FORM.LABELS.SEARCH_QUERRIES' | translate}}" data-custom-filter-tab>
<div class="tab-body">
Expand Down Expand Up @@ -60,7 +60,7 @@
<label class="control-label" translate>STOCK.FLUX</label>
<bh-clear on-clear="$ctrl.clearFluxIds()"></bh-clear>

<ui-select multiple name="inventory" ng-model="$ctrl.selectedFluxes">
<ui-select multiple name="inventory" ng-model="$ctrl.selectedFluxes" append-to-body="true">
<ui-select-match>
<span translate>{{$item.label}}</span>
</ui-select-match>
Expand Down

0 comments on commit 6df81ac

Please sign in to comment.