Closed jdirand closed 1 year ago
Can you provide the props you are giving to the Select
component?
I have copied the example from the storybook, the props are these one:
label="Label pour liste déroulante"
nativeSelectProps={{}}
state="error"
stateRelatedMessage="Texte d’erreur obligatoire"
The storybook is the actual lib running, the code when you copy the code you're getting the actuall code that generates what you see in the storybook.
The answer is to update @codegouv/react-dsfr
to the latest version.
Please let us know if your problem isn't solved.
Best regads
Just tested it on a fresh Vite project, but I couldn't reproduce this behavior.
@jdirand I would also suggest to update to the latest version of react-dsfr
.
Thanks guys, working fine with the latest version!
I am using the Select component in 2 projects and I have an issue with the error state : the error message is showing as a valid message (green with the check icon)
When I inspect the error message, the paragraph has 2 classes (fr-valid-text fr-error-text).
I am using the code from the story : https://react-dsfr-components.etalab.studio/iframe.html?viewMode=docs&id=components-select--error-state&args=#error-state