diff --git a/site/content/docs/5.0/components/dropdowns.md b/site/content/docs/5.0/components/dropdowns.md index 52da465a3712..2cfd72959911 100644 --- a/site/content/docs/5.0/components/dropdowns.md +++ b/site/content/docs/5.0/components/dropdowns.md @@ -903,6 +903,56 @@ Use `data-bs-offset` or `data-bs-reference` to change the location of the dropdo {{< /example >}} +### Auto close behavior + +By default, the dropdown menu is closed when clicking inside or outside the dropdown menu. You can use the `autoClose` option to change this behavior of the dropdown. + +{{< example >}} +
For more information refer to Popper's offset docs.
+autoClose
true
Configure the auto close behavior of the dropdown:
+true
- the dropdown will be closed by clicking outside or inside the dropdown menu.false
- the dropdown will be closed by clicking the toggle button and manually calling hide
or toggle
method. (Also will not be closed by pressing esc key)'inside'
- the dropdown will be closed (only) by clicking inside the dropdown menu.'outside'
- the dropdown will be closed (only) by clicking outside the dropdown menu.popperConfig