mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-03 17:07:15 +00:00
fix(inbound): preserve custom share strategy on edit (#5225)
This commit is contained in:
@@ -381,7 +381,8 @@ export default function InboundFormModal({
|
||||
// protocol reset drops a nodeId that no longer applies.
|
||||
useEffect(() => {
|
||||
if (!open) return;
|
||||
if (!nodeShareOptionAvailable && shareAddrStrategy === 'node') {
|
||||
const current = form.getFieldValue('shareAddrStrategy') as InboundFormValues['shareAddrStrategy'] | undefined;
|
||||
if (!nodeShareOptionAvailable && (current ?? 'node') === 'node') {
|
||||
form.setFieldValue('shareAddrStrategy', 'listen');
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
Reference in New Issue
Block a user