Closed vnbaaij closed 5 months ago
I think the issue here is actually the buttons all sprouting the disabled attribute in the first place - @nicholasrice may have thoughts here as well. Needs investigation.
Material Components have similar issues and the component should NOT add disabled
attribute or setting the disabled
itself. Instead formDisabledCallback
should be used.
See my comment on https://github.com/material-components/material-web/pull/5053 and https://stackoverflow.com/questions/77225218/how-do-i-check-if-a-form-element-input-or-button-etc-is-disabled-by-itself-or
I just ran into this. This is surprising behavior and should at least be enabled/disabled with a setting provided by your API.
In my case the fieldset
is in a parent component and its state is not easily accessible. Using the workaround provided here is a hassle and is not a good resulting experience of your product.
Thank you for your consideration in getting this resolved.
I just ran into this. This is surprising behavior and should at least be enabled/disabled with a setting provided by your API.
In my case the
fieldset
is in a parent component and its state is not easily accessible. Using the workaround provided here is a hassle and is not a good resulting experience of your product.Thank you for your consideration in getting this resolved.
Thanks, the dependency on FAST Foundation has been dropped in Fluent UI for the next version and I believe this will have a solution for the vNext (PR linked, code in Beta). I'm not sure it's easily back portable given the breaking nature, but it may be possible in Fluent as these are "somewhat" internals. https://github.com/microsoft/fluentui/pull/30999
🐛 Bug Report
This is a bug posted on the fluentui-blazor repo but is directly caused by a bug in
fluent-button
When a
FluentButton
is inside afieldset
, all of them get disabled when thatfieldset
is disabled which is correct. However when thefieldset
is no longer disabled, theFluentButton
s are still disabled.💻 Repro or Code Sample
🤔 Expected Behavior
The
FluentButton
s should be enabled once the fieldset is not disabled anymore.😯 Current Behavior
The
FluentButton
s are still disabled. The standardbutton
s are for confirming that the code works as intended and they get enabled.💁 Possible Solution
Unknown, I tried adding extra
StateHasChanged
called too but it doesn't work.🔦 Context
🌍 Your Environment