3x-ui/frontend/src
MHSanaei 90e11dc0f6
fix(frontend): forceRender all tabs so fields register at modal open (B18)
AntD Tabs with the `items` API lazy-mounts inactive tab panes by
default. The Form.Items inside an unvisited tab never register, so:

- Form.useWatch on a parent path (e.g. 'sniffing') returns a partial
  view containing only registered children. Until the user clicked the
  Sniffing tab, Advanced > Sniffing JSON showed `{sniffing: {}}`
  instead of the full default object set by setFieldsValue.
- After visiting the Sniffing tab once, the `sniffing.enabled` Form.Item
  registered, so useWatch suddenly returned `{enabled: false}` — still
  partial, because the rest of the sniffing children only register when
  their Form.Items mount in conditional sub-sections.

Setting `forceRender: true` on every tab item forces all tab panes to
mount at modal open. Every Form.Item registers immediately; the watch
result reflects the full form value seeded by buildAddModeValues. This
also likely resolves the earlier "Invalid discriminator value" error
on submit, which surfaced when streamSettings had an unregistered
security field whose Form.Item hadn't mounted yet.
2026-05-26 16:40:11 +02:00
..
api feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00
components fix(frontend): seed full Zod-schema defaults for stream slices + QUIC params (B17) 2026-05-26 16:31:57 +02:00
entries Migrate frontend models/api/utils to TypeScript and modernize AntD theming (#4563) 2026-05-25 14:34:53 +02:00
generated feat(codegen): Go-first tool emitting Zod schemas and TS types 2026-05-25 19:29:44 +02:00
hooks feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00
i18n Frontend rewrite: React + TypeScript with AntD v6 (#4498) 2026-05-23 15:21:45 +02:00
layouts feat(frontend): TanStack Query + React Router migration & in-panel API docs (#4541) 2026-05-24 21:34:52 +02:00
lib/xray feat(frontend): round-trip XHTTP padding-obfs + remaining advanced knobs 2026-05-26 14:27:43 +02:00
models Migrate frontend models/api/utils to TypeScript and modernize AntD theming (#4563) 2026-05-25 14:34:53 +02:00
pages fix(frontend): forceRender all tabs so fields register at modal open (B18) 2026-05-26 16:40:11 +02:00
schemas feat(frontend): inbound Hysteria stream sub-form (auth + udpIdleTimeout + masquerade) 2026-05-26 13:44:00 +02:00
styles Migrate frontend models/api/utils to TypeScript and modernize AntD theming (#4563) 2026-05-25 14:34:53 +02:00
test feat(frontend): round-trip XHTTP padding-obfs + remaining advanced knobs 2026-05-26 14:27:43 +02:00
utils refactor(frontend): tighten HttpUtil generics from any to unknown 2026-05-25 19:51:39 +02:00
env.d.ts Migrate frontend models/api/utils to TypeScript and modernize AntD theming (#4563) 2026-05-25 14:34:53 +02:00
main.tsx Migrate frontend models/api/utils to TypeScript and modernize AntD theming (#4563) 2026-05-25 14:34:53 +02:00
queryClient.ts feat(frontend): TanStack Query + React Router migration & in-panel API docs (#4541) 2026-05-24 21:34:52 +02:00
routes.tsx feat(frontend): TanStack Query + React Router migration & in-panel API docs (#4541) 2026-05-24 21:34:52 +02:00