From 06eb176a9d9e10cb9ec2793ae70d37156dca3f1b Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio@bekerle.com>
Date: Tue, 11 May 2021 09:21:43 +0200
Subject: [PATCH] Reset value attribute to really make sure it is empty and
 will trigger a change event when it is set again with the previous value

---
 packages/person-select/src/person-select.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/packages/person-select/src/person-select.js b/packages/person-select/src/person-select.js
index bbaf34b3..02df24f8 100644
--- a/packages/person-select/src/person-select.js
+++ b/packages/person-select/src/person-select.js
@@ -75,6 +75,10 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) {
         this.object = null;
         $(this).attr("data-object", "");
         $(this).data("object", null);
+        this.value = "";
+        // Reset value attribute to really make sure it is empty and will trigger a change event
+        // when it is set again with the previous value
+        $(this).attr("value", "");
         this.$select.val(null).trigger('change').trigger('select2:unselect');
     }
 
-- 
GitLab