@ctrliq/quantic-components 1.63.3 → 1.63.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.
@@ -4785,8 +4785,8 @@
4785
4785
  this._activeIndex = -1;
4786
4786
  this.cleanup?.();
4787
4787
  this.cleanup = undefined;
4788
- if (this.allowCustomValue && commit) {
4789
- this.commitCustomValue();
4788
+ if (commit && (this.allowCustomValue || !this._inputValue.trim())) {
4789
+ this.commitInputValue();
4790
4790
  }
4791
4791
  else {
4792
4792
  const selected = this.options.find((o) => o.value === this.value);
@@ -4794,7 +4794,7 @@
4794
4794
  selected?.label ?? (this.allowCustomValue ? this.value : '');
4795
4795
  }
4796
4796
  }
4797
- commitCustomValue() {
4797
+ commitInputValue() {
4798
4798
  const trimmed = this._inputValue.trim();
4799
4799
  this._inputValue = trimmed;
4800
4800
  if (trimmed === this.value)
@@ -4892,10 +4892,10 @@
4892
4892
  this.selectOption(opt);
4893
4893
  }
4894
4894
  }
4895
- else if (this.allowCustomValue && this._inputValue.trim()) {
4895
+ else if (this._open &&
4896
+ (this.allowCustomValue || !this._inputValue.trim())) {
4896
4897
  e.preventDefault();
4897
4898
  this.closeList(true);
4898
- this.commitCustomValue();
4899
4899
  }
4900
4900
  break;
4901
4901
  case 'Escape':
@@ -5426,7 +5426,7 @@
5426
5426
  ], exports.Combobox.prototype, "_activeIndex", void 0);
5427
5427
  exports.Combobox = __decorate([
5428
5428
  event('value-changed', {
5429
- description: 'Fired when the user selects an option from the list, or commits a custom value when allowCustomValue is enabled.',
5429
+ description: 'Fired when the user selects an option from the list, clears the field, or commits a custom value when allowCustomValue is enabled.',
5430
5430
  detail: '{ value: string }',
5431
5431
  }),
5432
5432
  event('input-changed', {