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

Button Component not styled if dynamically disabled #260

Closed vadim-lisovyi closed 5 months ago

vadim-lisovyi commented 7 months ago

Description

I have a problem with the button component. When the disabled property is passed, the button is disabled in HTML, but the class is not applied.

Steps to play

Pass the disabled property to the button component. Note that the button is disabled in the HTML, but the class is not applied.

Expected behavior

When the disabled property is passed, the button must be disabled in both the class and the HTML.

Actual behavior

The button is disabled in HTML, but does not accept new styles. However, upon initialization, components with disabled="true" styles are displayed correctly, but when switched to disabled="false" they remain visually blocked even though they are unlocked in HTML.

Possible solution

Make sure that passing the disabled property not only applies the class and disables the button in the HTML on the initial value, but also on subsequent dynamic changes to the disabled attribute.

Additional Information

Version: 0.1.2

image image

vadim-lisovyi commented 7 months ago

Maybe is related to https://github.com/themesberg/flowbite-vue/pull/233

vadim-lisovyi commented 7 months ago

The same behaviour with outline attr.

Sqrcz commented 6 months ago

Thank you for catching this... 🙌

https://github.com/themesberg/flowbite-vue/pull/271 should fix this.

vadim-lisovyi commented 5 months ago

Thanks @Sqrcz, everything works fine now