Sha256: 598f55f98cb9eeede2fa5049d7dc290f4eb9c50ccbec34e9976f7a391049f2a9

Contents?: true

Size: 502 Bytes

Versions: 3

Compression:

Stored size: 502 Bytes

Contents

import Combobox from "hw_combobox/models/combobox/base"
import { dispatch } from "hw_combobox/helpers"

Combobox.Events = Base => class extends Base {
  _dispatchSelectionEvent({ isNew }) {
    const detail = {
      value: this.hiddenFieldTarget.value,
      display: this._fullQuery,
      query: this._typedQuery,
      fieldName: this.hiddenFieldTarget.name,
      isValid: this._valueIsValid,
      isNew: isNew
    }

    dispatch("hw-combobox:selection", { target: this.element, detail })
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hotwire_combobox-0.1.41 app/assets/javascripts/hw_combobox/models/combobox/events.js
hotwire_combobox-0.1.40 app/assets/javascripts/hw_combobox/models/combobox/events.js
hotwire_combobox-0.1.39 app/assets/javascripts/hw_combobox/models/combobox/events.js