app/assets/javascripts/models/combobox/options.js in hotwire_combobox-0.1.13 vs app/assets/javascripts/models/combobox/options.js in hotwire_combobox-0.1.14

- old
+ new

@@ -8,12 +8,12 @@ } _isValidNewOption(query, { ignoreAutocomplete = false } = {}) { const typedValue = this._actingCombobox.value const autocompletedValue = this._visibleOptionElements[0]?.getAttribute(this.autocompletableAttributeValue) - const insufficentAutocomplete = !autocompletedValue || !startsWith(autocompletedValue, typedValue) + const insufficientAutocomplete = !autocompletedValue || !startsWith(autocompletedValue, typedValue) - return query.length > 0 && this._allowNew && (ignoreAutocomplete || insufficentAutocomplete) + return query.length > 0 && this._allowNew && (ignoreAutocomplete || insufficientAutocomplete) } get _allowNew() { return !!this.nameWhenNewValue }