Skip to content

Commit

Permalink
fix: dot in context fields (#4434)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Aug 7, 2023
1 parent 168b31a commit 1fe32e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -40,7 +40,9 @@ export const PlaygroundEnvironmentDiffTable = ({
const contextFieldsHeaders = Object.keys(firstContext).map(
contextField => ({
Header: capitalizeFirst(contextField),
accessor: `${environments[0]}.context.${contextField}`,
accessor: (
row: Record<string, { context: Record<string, unknown> }>
) => row[environments[0]]['context'][contextField],
minWidth: 160,
Cell: HighlightCell,
})
Expand Down
Expand Up @@ -33,7 +33,8 @@ export const PlaygroundEnvironmentTable = ({
const dynamicHeaders = Object.keys(features[0].context).map(
contextField => ({
Header: capitalizeFirst(contextField),
accessor: `context.${contextField}`,
accessor: (row: { context: Record<string, unknown> }) =>
row['context'][contextField],
minWidth: 160,
Cell: HighlightCell,
})
Expand Down

0 comments on commit 1fe32e0

Please sign in to comment.