Skip to content

fix: Content Manager, Click outside the filter popover does not close it #982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 18, 2023

Conversation

gitstart
Copy link
Contributor

@gitstart gitstart commented May 3, 2023

Fixes strapi/strapi#16381

What does it do?

  • Adds onClose to Popover component, which would be triggered whenever the user clicks outside the popover dropdown.

Why is it needed?

  • To Support toggling the visibility of the popover whenever a user clicks outside the popover.

How to Test

  1. Open the popover component in the storybook.
  2. Click on the button to open the popover menu.
  3. Click outside the popover menu to close it. Notice that it closes as expected.

Demo

Screen.Recording.2023-05-03.at.09.49.45.mov

@vercel
Copy link

vercel bot commented May 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2023 4:05pm
design-system-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2023 4:05pm

@joshuaellis
Copy link
Contributor

IMO we should use the DismissibleLayer component.

@gitstart
Copy link
Contributor Author

Hi @joshuaellis,
The popover component has been updated to use DismissibleLayer component.

@joshuaellis joshuaellis force-pushed the release/1.8.0 branch 2 times, most recently from e90865d to 2eb3850 Compare May 18, 2023 10:10
@joshuaellis joshuaellis force-pushed the fix/popover-outside-click branch from 13349fd to 2ed1dd3 Compare May 18, 2023 15:39
gitstart and others added 2 commits May 18, 2023 16:39
Co-authored-by: oxenprogrammer <[email protected]>
Co-authored-by: raph941 <[email protected]>
Co-authored-by: oxenprogrammer <[email protected]>
Co-authored-by: raph941 <[email protected]>
Copy link
Contributor

@Feranchz Feranchz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@joshuaellis joshuaellis merged commit c6b0eb6 into strapi:release/1.7.6 May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: design-system relates to design-system package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CM: Click outside the filter popover does not close it
3 participants