refactor: change form handler on ExportOptionsModal#4207
Conversation
Deploying nmrium with
|
| Latest commit: |
005cfc6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://55f72786.nmrium.pages.dev |
| Branch Preview URL: | https://4172-refactor-useform-on-exp.nmrium.pages.dev |
|
I suggest you take care of #4215 in a separate PR to unblock this. |
There was a problem hiding this comment.
Advanced Mode looks broken
Height, Width and Unit are empty.
This forms reminds me this one:
I suggest you to refactor / re-use part of this form or copy-paste it. It is working properly even in advanced mode.
src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx
I hope the data-struct is the same so you can simply re-use the field-group.
This one also use setFieldValue, but with dontRunListeners: true option. without it, editing values was slow, editing width edit height, and height edit the width. it loop until conversion between both was stable (or tanstack have a kill-switch to stop this kind of infinite edit-loop). So I predict your current implementation have this issue.
|
It should be the same data-struct. Or at least compatible with
Both should looks and behave exactly the same. Both forms edit |
tpoisseau
left a comment
There was a problem hiding this comment.
After you took into account my last comment, you are good to merge.




Closes: #4172