Closed revolunet closed 1 month ago
Hey @revolunet,
Let's maybe just make to component "use client";
what do you think?
I've released @codegouvfr/react-dsfr@1.9.26-rc.0 so you can try it out.
Ok I've fixed it.
While bypassing the core DSFR logic seems tempting I made a rule of never doing that.
I don't want react-dsfr behavior to diverge in any way from @gouvfr/dsfr.
So when this type of scenario occurs, the solution is to observe the DOM and reconsile the state at the React level.
Thanks for reporting!
Perfect thanks Sir 🙏
While the
PasswordInput
works correcly in the storybook demo, the behaviour is buggy on this basic example.Look like there is some react integration issues with the "native" DSFR JS here.
Indeed, when the component rerenders, it sets back the
type
topassword
as its not aware of DSFR DOM edits...I'm thinking about reimplementing the toggle logic in the react-dsfr component.... WDYT ?