Fixes issue where the title field name is shown rather than the value

This commit is contained in:
Tyler La Fronz
2021-10-27 09:20:54 -04:00
parent e4dd6c0aa6
commit 82628d460a

View File

@@ -1,5 +1,6 @@
import { forwardRef } from "react";
import { IPopoverInlineCellProps } from "../types";
import { get } from "lodash";
import { ButtonBase, Grid, Chip } from "@mui/material";
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
@@ -29,9 +30,9 @@ export const ConnectService = forwardRef(function ConnectService(
>
<ChipList>
{Array.isArray(value) &&
value.map((doc: any) => (
<Grid item key={doc.primaryKey}>
<Chip label={config.titleKey} size="small" />
value.map((snapshot) => (
<Grid item key={get(snapshot, config.primaryKey)}>
<Chip label={get(snapshot, displayKey)} size="small" />
</Grid>
))}
</ChipList>