Repository navigation
1. Custom Columns Prop (w/ Default Renderer & Dot Path Utility) #442
Description
Activity
Jons Comments
Transferring comments here (ticket would not transfer easily from admin to lectern)
Thank you for explicitly calling out for the creation of a
MetaValueRenderercomponent.I would call out the following requirement:
- This component will be used by default for a custom column if no custom
componentis specified
Also, I agree that it should be exported, but I don't understand the purpose of your example usage.
- Each entry in the array is either a path-based config (columnHeader + metaPath) or a component-based config (columnHeader + columnComponent)
- Omitting the prop produces no change to existing behaviour
- TypeScript rejects entries that provide both metaPath and columnComponent, or neither
I think there is value to creating a custom component that gets a value read from a
metaPath. As an example, you could create a component that renders a set of known values using an icon+link, and then you want to reuse that component for different meta properties. With your requirements, I would need a custom component for each meta property. Instead, I recommend that we allow both customcomponentand themetaPathproperties for a custom column.Each custom component should accept the following props:
Property Type Description metaPathstring the metaPathstring property given to the custom component.valueDictionaryMetaType from Lectern orundefinedThe value at the metaPath for the field. fieldSchemaFieldType from LecternThe full field definition from the schema. The requirement for a custom column should be that it requires either
metaPathor a customcomponent, or both.metaPathonly : useMetaValueRenderercomponentcomponentonly : use the component, providemetaPathasundefinedandvalueasundefined, but thefieldvalue will still have the full field details- both : use the custom component, provide the
metaPathstring and the value (if available) from the metadata
Arrays and objects produce readable output that does not cause cell overflow
Values exceeding the available cell width are truncated with the full content accessible on hoverThis is a vague requirement. It is not clear what the max cell size will be, as row height depends on screen width and the content of the other columns, and column width is undefined at present.
For arrays, perhaps we want to reuse the existing unordered list implementation that has the view more behaviour?
How do you plan to handle simple objects #like:
{ "optionA": "value 1", "optionB": "value 2", }How about objects with mixed value types like:
{ "optionA": "value 1", "optionB": 987654321, "optionC": ["a", "b", "c"], "optionD": [123, 456, 789], }And lastly, how d oyou want to render deeply nested objects:
{ "value": "value 1", "withNested": { "value": 123, "mostNested": { "value": ["a", "b", "c"], "moreNested": { "valuest": "important data, don't forget me!" } } } }- This component will be used by default for a custom column if no custom
- added a commit that references this issue
on Apr 23, 2026
Introduce a
customColumnsoptional prop onDictionaryTableViewerand implement theMetaValueRenderercomponent. Both are exported from the package public API and form the complete contract that all downstream tickets implement against.customColumnspropThe prop accepts an array of column configurations. Each entry is either a path-based config (
columnHeader+metaPath) or a component-based config (columnHeader+columnComponent). The prop is entirely optional; when omitted, the component behaves identically to the current implementation.Both modes can be mixed freely within the same array:
MetaValueRenderercomponentAccepts a single value of any type and renders it appropriately for display in a table cell:
Long values that overflow the cell are truncated and use our already implemented show more design pattern.
Exported so developers can use it inside their own
columnComponentimplementations when they want standard display behaviour without writing their own type-handling logic:The `MetaValueRenderer1 component will be used by default for a custom column if no custom component is specified
getByDotPathutilityExtract
getByDotPathfrom its current private implementation insideDictionaryTableViewer.tsxinto a shared, exported location. The utility resolves a dot-notation path string against aSchemaFieldobject and returns the value at that path, orundefinedif any key in the chain is absent. It must never throw.It serves two roles: internally by the framework to resolve
metaPathvalues for path-based columns, and as an export for developers who want safe nested property access inside their owncolumnComponentimplementations:Acceptance Criteria
customColumnsis accepted as an optional prop onDictionaryTableViewercolumnHeader+metaPath) or a component-based config (columnHeader+columnComponent)metaPathandcolumnComponent, or neitherMetaValueRendererhandles all supported value types without errorsMetaValueRendereris exported from the package public APISchemaFieldobjectundefinedwithout throwinggetByDotPathis exported from the package public APIDictionaryTableViewer.tsxis replaced with a reference to the extracted utility, with no change in behaviourDependencies
None