flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

detect modal is open (javascript)

Open KinG-InFeT opened this issue 2 years ago • 5 comments

can i check modal (by id) is open or not by javascript?

KinG-InFeT avatar Mar 28 '22 13:03 KinG-InFeT

Hey @KinG-InFeT,

You can use the callback functions onShow and onHide and store it yourself.

zoltanszogyenyi avatar Mar 28 '22 13:03 zoltanszogyenyi

Hey @KinG-InFeT,

You can use the callback functions onShow and onHide and store it yourself.

ok thanks, it would be convenient not to store a lot of information, but to have a simple method to check if the modal is open or not (even a simple check on the hiddens class is present or not)

KinG-InFeT avatar Mar 28 '22 13:03 KinG-InFeT

I'll keep that in mind for the next update.

I think we could create a isHidden public function which could return true or false.

zoltanszogyenyi avatar Mar 28 '22 13:03 zoltanszogyenyi

any update?

KinG-InFeT avatar May 13 '22 16:05 KinG-InFeT

Hey @KinG-InFeT,

This issue has been addressed for v1.5 update (currently pushed to develop) by creating an isHidden method on the modal object.

Here's the commit:

https://github.com/themesberg/flowbite/commit/0430ca219750f0325e14252a379099f27e1b1409

ETA for v1.5 is 1-2 weeks because we want to launch more components, integrate keyboard events, fix other issues, and hopefully finish the Storybook integration.

zoltanszogyenyi avatar Jul 08 '22 15:07 zoltanszogyenyi

This has been addressed and will be released today for v1.5.4.

zoltanszogyenyi avatar Nov 15 '22 11:11 zoltanszogyenyi