themesberg / flowbite-vue

Official Vue 3 components built for Flowbite and Tailwind CSS
https://flowbite-vue.com
MIT License
723 stars 116 forks source link

feat: :sparkles: Add closeInside functionality to FwbDropdown component #263

Closed yacosta738 closed 5 months ago

yacosta738 commented 6 months ago

This PR solve -> Dropdown closes when clicking inside the dropdown.

The dropdown is currently closing when you click inside it because of the onClickOutside function from @vueuse/core that is being used. This function is set to close the dropdown when a click is detected outside the dropdown. However, the FwbSlotListener component inside the dropdown is also triggering this function when clicked, causing the dropdown to close. To prevent the dropdown from closing when clicking inside it, we can add a new property closeInside (default false) that prevents the onHide method from being triggered if this property is set to false.

Close: #99

netlify[bot] commented 6 months ago

Deploy Preview for sensational-seahorse-8635f8 ready!

Name Link
Latest commit 4c9e0144f58a4c87979e087a915b97d67d0de4df
Latest deploy log https://app.netlify.com/sites/sensational-seahorse-8635f8/deploys/65d88f78b2d715000857ff9c
Deploy Preview https://deploy-preview-263--sensational-seahorse-8635f8.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

cogor commented 5 months ago

Hey, first of all thank you for PR, can you fix lint error?

yacosta738 commented 5 months ago

@cogor I already corrected the linter suggestions.

cogor commented 5 months ago

LGTM