Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Initial value as array generates unnecessary new field #265

Open
DedeKurnn opened this issue Nov 16, 2024 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@DedeKurnn
Copy link

I'm using Qwik and I'm trying to get initial value of type array using route loader, but it generate these unnecessary additional fields with dot notation which mess up the validation.

      const response = await fetchData({
        requestEvent,
        endpoint,
      });

      return {
        dialect_id: response.data.dialect_id // this is array of string,
        bahasa_indonesia: response.data.bahasa_indonesia,
        bahasa_lampung: response.data.bahasa_lampung,
        sentence_lpg: response.data.sentence_lpg,
        sentence_id: response.data.sentence_id,
        region_id: response.data.region_id // this is array of number,
        status: "pending",
      };

image

I do not want this behavior. How do I solve this?

@fabian-hiller
Copy link
Owner

Can you share your schema or TypeScript type with me and also the useForm code?

@fabian-hiller fabian-hiller self-assigned this Nov 20, 2024
@fabian-hiller fabian-hiller added the question Further information is requested label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants