You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An invalid custom field shows an error message but child fields are not highlighted with the same red background that they would have when used standalone. For the Flow component, propagating the invalid state from the custom field to child components is relatively easy to achieve by enabling manual validation mode on child components and then overriding setInvalid to also mark child components as invalid.
However when using web component declaratively with Lit or React there is no easy solution to this. You'd have to get notified about the invalid state being changed on the custom field, and then set it on child components using refs, or create a state variable for the invalid state and then bind it to each child component. As automatic validation can not be disabled on child components the states might also get out of sync.
Describe the solution you'd like
Maybe custom field should propagate its invalid state to child fields by default. Or there should be an option to enable such a behavior.
The text was updated successfully, but these errors were encountered:
Describe your motivation
An invalid custom field shows an error message but child fields are not highlighted with the same red background that they would have when used standalone. For the Flow component, propagating the invalid state from the custom field to child components is relatively easy to achieve by enabling manual validation mode on child components and then overriding
setInvalid
to also mark child components as invalid.However when using web component declaratively with Lit or React there is no easy solution to this. You'd have to get notified about the
invalid
state being changed on the custom field, and then set it on child components using refs, or create a state variable for the invalid state and then bind it to each child component. As automatic validation can not be disabled on child components the states might also get out of sync.Describe the solution you'd like
Maybe custom field should propagate its invalid state to child fields by default. Or there should be an option to enable such a behavior.
The text was updated successfully, but these errors were encountered: