aboutsummaryrefslogtreecommitdiff
path: root/js/src/dropdown.js
AgeCommit message (Collapse)AuthorFilesLines
2021-03-02Dropdown — Drop `flip` option (#33198)Rohit Sharma1-3/+0
2021-03-02refactor: use a Map instead of an Object in dom/data (#32180)alpadev1-2/+2
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-16util: change `isRTL` to a function (#32446)XhmikosR1-6/+6
This allows the bundler to tree-shake the function.
2021-02-12Fix event handler removal in dropdown/carousel dispose (#33000)Kyle Tsang1-1/+2
* Fix event handler removal in carousel dispose * Fix event handler removal in dropdown dispose * Test event handlers in scrollspy dispose * Test event handlers in toast dispose * Test event handlers in tooltip dispose Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-10Release v5.0.0-beta2 (#32467)v5.0.0-beta2XhmikosR1-1/+1
* Bump version to 5.0.0-beta2 * Dist
2021-02-09Add function type for `popperConfig` option (#32882)Rohit Sharma1-5/+5
* Add function type for `popperConfig` option * Update .bundlewatch.config.json * copy edits Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-09Dropdown — Change the selector to check the use of Popper (#33003)Rohit Sharma1-2/+2
* Create the popper instance first Make sure that popper instance has been created first and then apply the styling on the dropdown(menu) * Use `data-bs-popper` attibute to check popper Co-authored-by: XhmikosR <[email protected]>
2021-02-09Remove .dropdown-menu[style] reset and adjust .dropdown-menu-* modifiersMark Otto1-2/+13
- Removes the &[style] selector that was used for resetting Popper styles - Separate Popper-based alignment from static alignment with `data-bs-popover` attribute that separates the --bs-position and custom right/left properties Co-Authored-By: Rohit Sharma <[email protected]>
2021-02-09Remove custom `fallbackPlacements` from dropdown (#32843)Rohit Sharma1-6/+0
2021-02-04Fix Popper preventOverflow boundary config (#32845)Kyle Tsang1-1/+1
Currently, the boundary config is being assigned to the wrong var (`rootBoundary`) in the popper config. It should be assigned to the `boundary` var in popper's config. Ref: https://popper.js.org/docs/v2/utils/detect-overflow/#boundary
2021-02-03Fix dropdown keys to open menu (#32750)Siju Samson1-0/+6
Co-authored-by: XhmikosR <[email protected]>
2021-02-03Dropdown — Emit events on the `.dropdown-toggle` button (#32625)Rohit Sharma1-7/+5
* Emit events on the dropdown button Emit the events on `.dropdown-toggle` button and then bubble up * Add migration note for events * Update the docs for events * Add unit test to check the event bubbling Co-authored-by: XhmikosR <[email protected]>
2021-02-03Remove the initial margin from dropdown/popover in favor of Popper (#32524)Rohit Sharma1-1/+1
* Remove the margin from dropdown in favor of Popper - Set the default margin to 0 for dropdowns (To remove the Popper's warning) - Set the required offset in dropdown's defaults * Remove the margin from the popover component Co-authored-by: XhmikosR <[email protected]>
2021-01-28Restore offset option for dropdown componentjoke2k1-2/+22
2021-01-13Throw a `TypeError` instead of the generic `Error` (#32585)Rohit Sharma1-1/+1
* Change from Error to TypeError * Convert the `NAME` to upper case to make the consistency in the error message * Update the remaining tests to be stricter Co-authored-by: XhmikosR <[email protected]>
2020-12-21Support Popper virtual elements (#32376)Nils K1-1/+10
Adds the ability to use objects implementing the virtual element interface as the value for the reference option of a dropdown config. Co-authored-by: XhmikosR <[email protected]>
2020-12-09Add fallback behaviourMartijn Cuppens1-0/+6
2020-12-08Refactor components to use a utility function to define jQuery plugins (#32285)alpadev1-15/+2
* refactor: use an utility function to define jQuery plugins * test: add spec for defineJQueryPlugin utility function * Update .bundlewatch.config.json Co-authored-by: XhmikosR <[email protected]>
2020-12-07Prepare v5.0.0-beta1.XhmikosR1-1/+1
2020-12-06Be explicit with `element.closest()`'s return valueXhmikosR1-1/+1
2020-12-06Fix conflict with Bootstrap CSSMartijn Cuppens1-15/+15
2020-12-06Update to popper.js v2.xJohann-S1-41/+15
2020-12-04feat(RTL): implement RTLGaël Poupard1-13/+14
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-02Unbreak lines. (#32304)XhmikosR1-4/+5
2020-11-29Remove setData from construtors (#32264)Rohit Sharma1-1/+0
2020-11-29Move `VERSION` to BaseComponent (#32254)Rohit Sharma1-5/+0
2020-11-29add dispose in base componentJohann-S1-2/+1
2020-11-29create a base componentJohann-S1-6/+8
2020-11-21Be consistent with Popper's name. (#32224)XhmikosR1-3/+3
The npm package is named "popper.js" but the project is named "Popper", so use the latter consistently.
2020-11-14Add `bs` in data attributesRohit Sharma1-1/+1
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-11Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3XhmikosR1-2/+2
2020-11-03dropdown.js: simplify code (#32055)XhmikosR1-4/+3
2020-11-01Streamline jQuery comment. (#32016)XhmikosR1-1/+1
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-11/+14
* extend jquery after domContentLoaded event is fired * add unittest for util onDOMContentLoaded * wait for trigger jquery event after domContentLoaded * remove domcontentready from eventHandler * move istanbul ignore statements to correct line Co-authored-by: XhmikosR <[email protected]>
2020-10-05Remove `Manipulator.toggleClass` (#31842)XhmikosR1-4/+4
It's only used in one place so it makes more sense to remove it for the time being.
2020-09-29Prepare v5.0.0-alpha2. (#31748)v5.0.0-alpha2XhmikosR1-2/+2
2020-07-12Add parentheses around multiple spread conditionsXhmikosR1-1/+1
2020-07-12Unbreak lines.XhmikosR1-4/+2
2020-06-17Unbreak short linesXhmikosR1-5/+1
2020-06-16Rename "master" to "main". (#31050)XhmikosR1-1/+1
2020-05-13Bump version to 5.0.0-alpha1 (#29925)XhmikosR1-2/+2
Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
2020-04-28Drop closest from SelectorEngine (#30653)Martijn Cuppens1-3/+3
Co-authored-by: XhmikosR <[email protected]>
2020-04-17Fix crash when pressing ArrowUp the first timeTanguy Krotoff1-1/+4
2020-04-17Replace event.which with event.key and event.buttonTanguy Krotoff1-17/+17
2020-03-25fix: remove make array util function (#30430)Johann-S1-6/+6
2020-03-23Use next dropdown menu instead of first of the parentMartijn Cuppens1-20/+17
2020-03-18Switch to strings constants.XhmikosR1-85/+77
This allows the minifier to mangle the constants. It also allows the linter to find unused strings properly. While at it, remove a few unused properties. File Before After Diff -------------------------------------------------------- bootstrap.bundle.min.js 23.61 kB 22.61 kB -1.00 kB (-4.23 %) bootstrap.min.js 17.04 kB 16.08 kB -0.96 kB (-5.63 %)
2020-03-09Improvement: harmonize usage of constants (#30285)Sparks1-1/+2
2019-10-17Skip hidden dropdowns while focusing (#29523)Jeremy Jackson1-0/+2
2019-10-03return to the original file structure to avoid breaking modularityJohann-S1-0/+545