FastUI
FastUI copied to clipboard
Adds support for nested models and array elements in DisplayLookup
fixes #86.
I found a simple way to implement a deep lookup in the object via a path without adding additional dependencies.
The syntax looks like this:
-
fieldName
for a plain (not-nested) lookup. -
arrayField.0
for looking up the 1st element of the array stored inarrayField
. Can take.x
for looking up thex
-th element. -
nested.attribute_1
for looking up the (nested) fieldattribute_1
in the top-level attributenested
. - any combinations of the above such as
nested.arrayField.1.attribute_1
Also, added an example to the demo page for the Users table.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!