From 971f74a113e5c03e74f94888c81c7c760906f00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eikeland?= Date: Wed, 4 Dec 2024 10:15:05 +0100 Subject: [PATCH] fix(person-select): adding html attribute name for selectedPerson --- .changeset/empty-jars-attack.md | 7 +++++++ packages/person/src/components/select/element.ts | 1 + 2 files changed, 8 insertions(+) create mode 100644 .changeset/empty-jars-attack.md diff --git a/.changeset/empty-jars-attack.md b/.changeset/empty-jars-attack.md new file mode 100644 index 000000000..e801d7a45 --- /dev/null +++ b/.changeset/empty-jars-attack.md @@ -0,0 +1,7 @@ +--- +"@equinor/fusion-wc-person": patch +--- + +### Changes in `PersonSelectElement` + +- Added the `attribute: 'selectedperson'` to the `selectedPerson` property config to fix use in react and as a legal html property name. diff --git a/packages/person/src/components/select/element.ts b/packages/person/src/components/select/element.ts index 6fe80343a..e0f73093a 100644 --- a/packages/person/src/components/select/element.ts +++ b/packages/person/src/components/select/element.ts @@ -127,6 +127,7 @@ export class PersonSelectElement search = ''; @property({ + attribute: 'selectedperson', converter(value) { /* converter to allow user to pass personobject as property */ if (value?.length) {