You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks fairly complicated but at the end of the day, it just parses and validates the search params related to some table operations.
Here is a zsa server function:
exportconstgetHostingTickets=createServerAction().input(z.object({filter: z.string().optional(),completed: z.boolean().default(false),before_today: z.boolean().default(false),id_client: z.string().uuid().optional(),sites: z.array(z.string()).default([]),models: z.array(z.number()).default([]),tableParams: TableParamsSchema.optional(),})).handler(async({ input })=>{// I do what I need to do here. All inferred types in "input" are 100% correct.});
Disclaimer: I am not a 100% sure if this is a
zsa
bug or my mistake.I have the following
zod
schema:It looks fairly complicated but at the end of the day, it just parses and validates the search params related to some table operations.
Here is a zsa server function:
Here is how I call this server function:
The console log shows correctly validated data in the correct form. But
![Image](https://private-user-images.githubusercontent.com/100420605/406679645-a14135ca-7663-48fe-9049-e3df0e9a8f59.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzUxMTUsIm5iZiI6MTczOTM3NDgxNSwicGF0aCI6Ii8xMDA0MjA2MDUvNDA2Njc5NjQ1LWExNDEzNWNhLTc2NjMtNDhmZS05MDQ5LWUzZGYwZTlhOGY1OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxNTQwMTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yZDQ2YTQ4NmNmOGRjZTllOTlmZTM4ODNhMzI2NTRmZGNhMjg1OGNjZTU1MzgyMjk1MmEyMmMwOTc0NjZhN2FmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.z3yzDL6TkAqzsOnkuwB4lpb_tC7U2ddKkVjIisqyM6k)
tableParams
in the input is underlined and says this:This error goes away as soon as I remove the
transform
from theorder
property.The text was updated successfully, but these errors were encountered: