flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Make modal isHidden as a function to return the current modal element state.

Open marciotoshio opened this issue 3 years ago • 3 comments

This patch fix https://github.com/themesberg/flowbite/issues/119 by setting the isHidden state based on the current modal element state, without this we always assume that the model is hidden every time we create a new instance.

marciotoshio avatar Sep 07 '22 02:09 marciotoshio

Hmm this will not fix properly the issue, we set isHidden in a new instance and the old reference does not set the isHidden failing on subsequents calls because isHidden is all messed up now.

marciotoshio avatar Sep 07 '22 03:09 marciotoshio

Making the isHidden as a function we can always check the actual value of the element to decide its property instead of relying on the instance.

marciotoshio avatar Sep 07 '22 03:09 marciotoshio

Hey @marciotoshio,

Thanks for contributing, I'll check this out today!

zoltanszogyenyi avatar Sep 12 '22 09:09 zoltanszogyenyi

@zoltanszogyenyi Did you check this yet?

yaqshank92 avatar Dec 06 '22 12:12 yaqshank92

Hey @yaqshank92,

Please check my latest comment here: https://github.com/themesberg/flowbite/issues/119

We have the v1.6.0 branch with some new updates, can you please test that out? Thanks!

zoltanszogyenyi avatar Dec 14 '22 12:12 zoltanszogyenyi

We have the isHidden() method on the Modal.

https://flowbite.com/docs/components/modal/#methods

zoltanszogyenyi avatar Jan 26 '24 09:01 zoltanszogyenyi