Skip to content
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

Automatically close a Dropdown when user clicks outside #552

Closed
dgdavid opened this issue Apr 27, 2023 · 14 comments · Fixed by #671
Closed

Automatically close a Dropdown when user clicks outside #552

dgdavid opened this issue Apr 27, 2023 · 14 comments · Fixed by #671
Assignees
Labels
enhancement New feature or request

Comments

@dgdavid
Copy link
Contributor

dgdavid commented Apr 27, 2023

After #545 be merged in master branch, the page options will be shown by using a PatternFly Dropdown placed close to the hamburger menu icon to open/close the sidebar.

The user can click on the arrow down icon to open the menu holding the options related to the current page. But this dropdown will be closed only when

  • the user closes it by clicking in the arrow again
  • the use clicks on any of the available options

Ideally, it should be closed automatically when clicking outside the dropdown itself too (right after losing the focus). At this time there is no prop (or I overlooked it) to tell the component to do so. But, looking at the source code it looks to me that current PatternFly Dropdown is/will be deprecated in favor of another that has a onOpenChange prop that might help to achieve the mentioned behavior. Have to check/test it better.

patternfly/patternfly-react@d43cf24

In any case, we should evaluate a way to automatically close that menu, although it is more a nice to have than a requirement for me.

@dgdavid dgdavid added the enhancement New feature or request label Apr 27, 2023
@Anandpandey0
Copy link

I can do this . Please assign it to me.

@dgdavid
Copy link
Contributor Author

dgdavid commented Apr 28, 2023

I can do this .

That would be great, thanks a lot! Just in case it can help, we were thinking of having a look at the availability of the new PatternFly Dropdown component first.

Please assign it to me.

Done!

@dgdavid
Copy link
Contributor Author

dgdavid commented Apr 28, 2023

Please, bear in mind that you have to work on top of the issues branch at this moment or... just wait a bit until @joseivanlopez merge it to master. Needless to say that you can ask us for help here or in the #yast IRC channel at Libera.Chat network

@joseivanlopez
Copy link
Contributor

Yes, you can create a PR through issues feature branch. Thanks!

@dgdavid
Copy link
Contributor Author

dgdavid commented May 9, 2023

@Anandpandey0,

Just in case you still interested on this issue, please be aware that issues branch was already merged into master. So you can start/continue working from there.

@dgdavid
Copy link
Contributor Author

dgdavid commented Jun 2, 2023

@Anandpandey0 just out of curiosity, are you finally playing with this one?

@balsa-asanovic
Copy link
Contributor

Hey there,

Can I take this over if @Anandpandey0 is no longer interested?

@imobachgs
Copy link
Contributor

To be honest, I do not know whether @Anandpandey0 is still interested. I would wait 1 or 2 weeks more and, if there is no response, I would reassign the issue to you, @balsa-asanovic.

@balsa-asanovic
Copy link
Contributor

Sure, let's do that

@imobachgs
Copy link
Contributor

OK, as @Anandpandey0 is not responding, I guess we can reassign this issue to @balsa-asanovic. Please, let us know whether you are still interested.

Thanks!

@balsa-asanovic
Copy link
Contributor

Hey @imobachgs, yeah definitely, assign away 😄

@balsa-asanovic
Copy link
Contributor

Hey @dgdavid @imobachgs ,

I wasn't sure should I tag some for pull request review, so here it is 😄

I've addressed this issue in PR #671

@imobachgs
Copy link
Contributor

Hey @dgdavid @imobachgs ,

I wasn't sure should I tag some for pull request review, so here it is smile

We usually keep an eye on the projects' pull request list, but feel free to assign the review to any of us just to be sure 😉

I've addressed this issue in PR #671

Thanks!

@balsa-asanovic
Copy link
Contributor

We usually keep an eye on the projects' pull request list, but feel free to assign the review to any of us just to be sure 😉

Great, thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants