Skip to content

Commit

Permalink
chore: support not-model HAS_ONE relationships (#726)
Browse files Browse the repository at this point in the history
Co-authored-by: Hein Jeong <heinje@amazon.com>
  • Loading branch information
hein-j and Hein Jeong authored Oct 25, 2022
1 parent 114540d commit 3b8486e
Show file tree
Hide file tree
Showing 15 changed files with 768 additions and 388 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ export default function BookCreateForm(props) {
setCurrentPrimaryAuthorDisplayValue(value);
setCurrentPrimaryAuthorValue(undefined); // empty out prev selected option
}}
suggestions={Array.from(authorRecords).map(([key, record]) => ({
id: key,
label: getDisplayValue['primaryAuthor']?.(record) ?? key,
suggestions={authorRecords.map((r) => ({
id: r.id,
label: getDisplayValue['primaryAuthor']?.(record) ?? r.id,
}))}
onSuggestionSelect={({ id, label }) => {
setCurrentPrimaryAuthorValue(authorRecords.find((r) => r.id === id));
Expand Down
Loading

0 comments on commit 3b8486e

Please sign in to comment.