[CB] New and repeat passwords can be different#4234
Conversation
| return null; | ||
| }); | ||
|
|
||
| function onPasswordBlur() { |
There was a problem hiding this comment.
We already have passwordRepeatRef that basically doing the same. The native notification should appear on form save. This is behaviour we had before and it worked. Do we know what happend?
There was a problem hiding this comment.
The issue was that executords didnt execute due to a lack of the form context
Also added the fix to keep the validity state actual because after the 1st fix above when we saved the form validity state was not actuall and form didnt allow to save it but passwords were equal at the same time
There was a problem hiding this comment.
I still don't understand what happened to original useContext(FormContext) and why we started to loose it.
There was a problem hiding this comment.
This behavior worked only for forms that were already wrapped with Form. So only for children
now I added this behavior also for parent forms
There was a problem hiding this comment.
While it's logical to add form as a property so it can be used in the same component with <Form/> and hook itself, I think this will not be obvious for developers and easily can be lost or misunderstood in refactoring
For example, when the hook is moved together with the input to the parent component with <Form/> developer can forget to add the form as an argument to this hook
Or when the developer decides to move the hook & input to a separate component, he can forget that he can omit this argument and will pass it to that new component as a prop
There was a problem hiding this comment.
Okay! Added check for that case
This reverts commit cefd174.
…on change also to keep the actual validity state
closes https://github.com/dbeaver/pro/issues/8572
Screen.Recording.2026-03-25.at.12.45.09.mov