Description
Course-correcting change added by #15562
The schema
prop is of EntityType[]
which represents a structure, except it's the QB config that's not native to the grids (that's why Field type in that config are directly compatible with columns for example, because the Grids uses those instead) and directly duplicates the Row Islands and Columns structure.
Point being, I don't see the need for that prop - the schema defined can be expressed with the expected HGrid setup and it likely should be.
I see no explanation in the PR or spec that reflects what the intended use is, we've mentioned perhaps load on demand with auto generate maybe, but even in that case I don't see it. Remember, we can create components dynamically, so nothing stopping you from doing:
@for (col of wouldBeLoadedColumnsConfig | asnyc; track col.key) {
<igx-column [field]="col.key" [header]="col.key"></igx-column>
}
If you can create the schema
object in-advance for it, you can create the columns too - they are configuration declarative components after all.
Also one more point: If it is indeed auto-generate AND you configure the columns (as you're meant to) on columnInit
with formatters and other i18n options, which ones do you think counts - the ones configure on the columns or the ones in the schema prop which is separate? That seems to me like it creates an opportunity for conflict besides the duplication.
Would like to know more, but if the above stands, I don't think we need the prop and should hide it before it gets used if possible.
Already hidden from other platforms with #15824