Baoyuantop commented on issue #3326:
URL:
https://github.com/apache/apisix-dashboard/issues/3326#issuecomment-4066702041
Thanks for raising this @vanshaj2023.
This is more of a UX enhancement than a bug — closing without saving is a
common default behavior in editor/form UIs. Re-labeling accordingly.
That said, the direction you mentioned (dirty check + confirm modal) is
reasonable. Before starting a PR, could you put together a more concrete
technical proposal? A few things to address:
1. **`isDirty` reliability** — The plugin editor uses `setValue` in a
`useEffect` to sync the config prop. You'll need to verify that
`formState.isDirty` accurately reflects *user* edits after that sync. If it
doesn't, a fallback like comparing `getValues("config")` against the original
prop value may be needed.
2. **Scope** — Should only apply when `mode` is `add` or `edit` (not `view`).
3. **i18n** — New translation keys are needed for all supported languages
(en, zh, de, es, tr).
Once you have a concrete plan, feel free to open a PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]