-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dropdown): add support for dropup
also improves the demo to show how to align the dropdown menu to the right Closes #667
- Loading branch information
Showing
3 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
27 changes: 21 additions & 6 deletions
27
demo/src/app/components/dropdown/demos/basic/dropdown-basic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
<div ngbDropdown> | ||
<button class="btn btn-outline-primary" id="dropdownMenu1" ngbDropdownToggle>Toggle dropdown</button> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenu1"> | ||
<button class="dropdown-item">Action - 1</button> | ||
<button class="dropdown-item">Another Action</button> | ||
<button class="dropdown-item">Something else is here</button> | ||
<div class="row"> | ||
<div class="col-xs-6"> | ||
<div ngbDropdown class="d-inline-block"> | ||
<button class="btn btn-outline-primary" id="dropdownMenu1" ngbDropdownToggle>Toggle dropdown</button> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenu1"> | ||
<button class="dropdown-item">Action - 1</button> | ||
<button class="dropdown-item">Another Action</button> | ||
<button class="dropdown-item">Something else is here</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-xs-6 text-xs-right"> | ||
<div ngbDropdown [up]="true" class="d-inline-block"> | ||
<button class="btn btn-outline-primary" id="dropdownMenu2" ngbDropdownToggle>Toggle dropup</button> | ||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu2"> | ||
<button class="dropdown-item">Action - 1</button> | ||
<button class="dropdown-item">Another Action</button> | ||
<button class="dropdown-item">Something else is here</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters