diff --git a/packages/person-select/src/person-select.js b/packages/person-select/src/person-select.js index 68d96a1e9c14d1078e6a746e3a6aab4a639c56f7..7de890b54cbbce426f67bf4a3334a58395f6a0d8 100644 --- a/packages/person-select/src/person-select.js +++ b/packages/person-select/src/person-select.js @@ -17,7 +17,8 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; const personContext = { "@id": "@id", - "name": "http://schema.org/name", + "givenName": "http://schema.org/givenName", + "familyName": "http://schema.org/familyName", "email": "http://schema.org/email" }; @@ -265,7 +266,10 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) { } generateOptionText(person) { - let text = person["name"]; + let text = person["givenName"] ?? ''; + if (person["familyName"]) { + text += ` ${person["familyName"]}`; + } // add birth date to name if present if (this.showDetails && (person["email"] !== undefined) && (person["email"] !== null)) {