Skip to content

Commit

Permalink
[ASL-4474] Add snippet context to model summary
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-horton-ho-sas committed Feb 19, 2024
1 parent 8504282 commit 3139da6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/model-summary/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ const ModelSummary = ({ model, schema, formatters = {}, className, formatNullVal
{
map(fields, (item, key) => {
const options = schema[key] || {};
const snippetProps = formatters[key]?.renderContext ?? {};
return (
<Fragment key={key}>
<dt><Snippet>{`fields.${key}.label`}</Snippet></dt>
<dt><Snippet {...snippetProps}>{`fields.${key}.label`}</Snippet></dt>
<dd>
<Value
value={model[key]}
Expand Down

0 comments on commit 3139da6

Please sign in to comment.