iway1 / trpc-panel

MIT License
627 stars 43 forks source link

Support for zod-form-data #96

Open Haschtl opened 7 months ago

Haschtl commented 7 months ago

Using a zod-form-data schema breaks trpc-panel.

import { zfd } from 'zod-form-data';

const uploadFileSchema = zfd.formData({
  file: zfd.file(),
  id: zfd.numeric(),
});

Using this schema as an input for a mutation causes the panel to crash: TypeError: Cannot use 'in' operator to search for 'Symbol(Symbol.iterator)' in undefined

Is there any solution to avoid this issue? I think it would be enough to partially "ignore" FormData, as inputs may be hard to implement. Having these mutations just listed without the Input-field would be great!