next-admin icon indicating copy to clipboard operation
next-admin copied to clipboard

[BUG] - Expression produces a union type that is too complex to represent.

Open eng-ahmad-sameer opened this issue 10 months ago • 1 comments

Description

On the next admin options under the list, the search field displays the below error:

Image

@premieroctet/next-admin-generator-prisma version => ^0.0.2

Maybe it happens if the number of the generated relation for the search field is huge like below:

Image

Reproduction URL

Not available

Reproduction steps

Not available

Next router

App router

Next Admin version

^7.1.0

Screenshots

Not available

Next Admin options

It happen for all model's search keys.

Logs

Not available

Browsers

Chrome

eng-ahmad-sameer avatar Feb 19 '25 20:02 eng-ahmad-sameer

Hello @eng-ahmad-sameer

To type the search field, we are going 4 levels deep at most on each fields where its possible to do, so its possible that it can cause complex type on tables that contains a lot of fields and relations. We'll maybe need to reduce this deepness to 3 or 2, or even allow it to be configured

foyarash avatar Apr 15 '25 12:04 foyarash