From 79407c473aac8b6e37e28159ef57f949285a4b31 Mon Sep 17 00:00:00 2001 From: Umer Farooq Date: Sun, 11 Dec 2016 20:33:25 -0500 Subject: [PATCH] feat(dropdown): add optional placement and respect bootstrap classes Add an optional dropdown-placement attribute setting much like the tooltips'. If it is specified then bootstrap's dropup and dropdown-menu-right classes will be ignored. Updated positioning of the dropdown menu to always use the position service. Ensured that dropup and dropdown-menu-right will be respected for append-to and append-to-body dropdowns. Updated positioning service to return the element when looking for the offsetParent if the element is not statically positioned. --- src/dropdown/docs/demo.html | 123 ++++++++++++++++++++++++++++++++++++ src/dropdown/docs/readme.md | 19 ++++++ src/dropdown/dropdown.js | 75 +++++++++------------- src/position/position.js | 2 +- 4 files changed, 174 insertions(+), 45 deletions(-) diff --git a/src/dropdown/docs/demo.html b/src/dropdown/docs/demo.html index 0bb9586689..35d21b1ece 100644 --- a/src/dropdown/docs/demo.html +++ b/src/dropdown/docs/demo.html @@ -131,6 +131,129 @@

append-to vs. append-to-body vs. inline example

+ +

Inline placement and positioning

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+

append-to-body placement and positioning

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +