html-combobox-element 0.0.2-beta.2 → 0.0.2-beta.4

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.
@@ -324,7 +324,7 @@ ${urls.map(url => `@import "${url}";`)}
324
324
  display: block;
325
325
  }
326
326
 
327
- :host([clearable]) [part*="clear-tag"] {
327
+ :host([multiple][clearable]) [part*="clear-tag"] {
328
328
  display: block;
329
329
  }
330
330
 
@@ -275,7 +275,7 @@ class HTMLComboboxElement extends HTMLElement {
275
275
  }
276
276
  #onSelectOption = (event) => {
277
277
  const target = event.target;
278
- if (target && target instanceof HTMLElement) {
278
+ if (target) {
279
279
  const option = target.closest('box-option');
280
280
  if (option) {
281
281
  if (this.#values.has(option.value))
@@ -297,7 +297,7 @@ class HTMLComboboxElement extends HTMLElement {
297
297
  };
298
298
  #onClearTag = (event) => {
299
299
  const target = event.target;
300
- if (target && target instanceof HTMLElement) {
300
+ if (target) {
301
301
  const tag = target.closest('box-tag');
302
302
  if (tag) {
303
303
  const value = tag.getAttribute('value');
@@ -321,7 +321,7 @@ ${urls.map(url => `@import "${url}";`)}
321
321
  display: block;
322
322
  }
323
323
 
324
- :host([clearable]) [part*="clear-tag"] {
324
+ :host([multiple][clearable]) [part*="clear-tag"] {
325
325
  display: block;
326
326
  }
327
327
 
@@ -271,7 +271,7 @@ export class HTMLComboboxElement extends HTMLElement {
271
271
  }
272
272
  #onSelectOption = (event) => {
273
273
  const target = event.target;
274
- if (target && target instanceof HTMLElement) {
274
+ if (target) {
275
275
  const option = target.closest('box-option');
276
276
  if (option) {
277
277
  if (this.#values.has(option.value))
@@ -293,7 +293,7 @@ export class HTMLComboboxElement extends HTMLElement {
293
293
  };
294
294
  #onClearTag = (event) => {
295
295
  const target = event.target;
296
- if (target && target instanceof HTMLElement) {
296
+ if (target) {
297
297
  const tag = target.closest('box-tag');
298
298
  if (tag) {
299
299
  const value = tag.getAttribute('value');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-combobox-element",
3
- "version": "0.0.2-beta.2",
3
+ "version": "0.0.2-beta.4",
4
4
  "description": "The combo-box web-component & customizable select polyfill",
5
5
  "type": "module",
6
6
  "scripts": {