@nys-cui/cui-formpill 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cui-formpill.js +22 -2
package/package.json
CHANGED
package/src/cui-formpill.js
CHANGED
@@ -147,6 +147,15 @@ class CUI_FORMPILL_PILL extends HTMLElement {
|
|
147
147
|
|
148
148
|
}
|
149
149
|
|
150
|
+
disconnectedCallback() {
|
151
|
+
|
152
|
+
for (let dPopover of document.body.querySelectorAll('cui-formpill-popover')) {
|
153
|
+
if (dPopover.state.dFor === this) {
|
154
|
+
document.body.removeChild(dPopover);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
150
159
|
|
151
160
|
}
|
152
161
|
|
@@ -296,6 +305,15 @@ class CUI_FORMPILL extends HTMLElement {
|
|
296
305
|
|
297
306
|
}
|
298
307
|
|
308
|
+
if (this._state.dMenuPopover) {
|
309
|
+
this._state.dMenuPopover.state.bOpen = false;
|
310
|
+
document.body.removeChild(this._state.dMenuPopover)
|
311
|
+
this._state.dMenuPopover = null;
|
312
|
+
document.body.removeEventListener('click', this.fGlobalBodyClick);
|
313
|
+
this._state.bMenuDisplayed = false;
|
314
|
+
}
|
315
|
+
|
316
|
+
|
299
317
|
this.render(true);
|
300
318
|
}
|
301
319
|
get label() {
|
@@ -830,7 +848,7 @@ class CUI_FORMPILL extends HTMLElement {
|
|
830
848
|
if (controls.value.search) {
|
831
849
|
this.dValueField.setAttribute('search', true)
|
832
850
|
}
|
833
|
-
|
851
|
+
|
834
852
|
if (pill._state.sValue2.indexOf(',') == -1) {
|
835
853
|
this.dValueField.setAttribute('value', pill._state.sValue2)
|
836
854
|
}
|
@@ -1280,7 +1298,9 @@ class CUI_FORMPILL extends HTMLElement {
|
|
1280
1298
|
|
1281
1299
|
if (this._state.dMenuPopover) {
|
1282
1300
|
this._state.dMenuPopover.state.bOpen = false;
|
1283
|
-
this._state.dMenuPopover.
|
1301
|
+
if(this._state.dMenuPopover.isConnected) {
|
1302
|
+
document.body.removeChild(this._state.dMenuPopover);
|
1303
|
+
}
|
1284
1304
|
this._state.dMenuPopover = null;
|
1285
1305
|
}
|
1286
1306
|
|