Use `childErrors` within a Categorization Layout Renderer

Hi, good work with this library, I am using it heavily in our new application. One thing I am wondering is: I am creating a big form with many categories, which are renderered using a “collapse/accordion” UI. For each category item I want to display if there are any errors left in the ‘child’ data. I saw an example here: jsonforms-vuetify-renderers/ListWithDetailRenderer.vue at main · eclipsesource/jsonforms-vuetify-renderers · GitHub However this is a ListWithDetail renderer, which has a different binding. Can you give some pointers on how to solve this with a Categorization renderer? Thanks!

Hi @jdwit,

The ListWithDetail renderer was implemented to be used against an array of elements. Therefore it’s easy to determine all child errors, they are simply all errors whose path point into the array.

For Categorization it’s not that easy because it can contain arbitrary controls handling arbitrary segments of the overall schema/data. Therefore how easy a childErrors for Categorization is to implement depends on your use cases.

If you have a simplified use case, e.g. a Category only contains controls for a certain object, then you can do the same simple path filtering like we do in the array case, see here. In case you need to support the generic use case with all potential controls then you need to traverse your Category UI Schema and collect the errors for all contained controls. You can check the bindings for a single control to see how to do that.