I’m using the form controls web components like s-text-field and s-checkbox in my React app. However, I’m facing an issue where the error styling doesn’t apply consistently.
When displaying validation errors dynamically (e.g., after user interaction), the error-related CSS classes are sometimes not added on the first attempt. Strangely, it starts working correctly after the initial interaction or re-render.
Is this a known issue with dynamic updates in these components? Are there any recommended practices to ensure consistent error styling when using these web components in a React environment?
Hey @jaymit_b - thanks for flagging this. I’m thinking this may be a common attribute → property mismatch that can happen when React renders custom elements, but it would be super helpful to see exactly how the components are being used in your code.
If you’re comfortable with it, could you share/post a small snippet that shows how you render s-text-field (or s-checkbox) and how you update the error state?
A minimal example with just the JSX plus the validation logic would be great! With that, I can confirm with some folks internally whether the attribute/property sync is the culprit or if there’s an issue on our end. Hope to hear from you soon!
Hey @jaymit_b - just following up with you here as I heard back from our team quickly. It looks like there have been other reports of this and we’re tracking them here:
I’ll close out this thread as solved now, but please feel free to follow along in that other thread for updates. Hope this helps a little bit.