Sha256: 6382123c771d4e7b840d863888fd7c4f366c387a2a6224565ae073cd10221569

Contents?: true

Size: 410 Bytes

Versions: 27

Compression:

Stored size: 410 Bytes

Contents

import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static get targets() {
    return [ "signedBlobId", "filename" ]
  }

  pick(event) {
    let select = event.currentTarget
    let option = select.options[select.selectedIndex]
    this.signedBlobIdTarget.value = option.dataset.signedBlobId || ""
    this.filenameTarget.value = option.dataset.filename || ""
  }
  
}

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
spina-2.4.0 app/assets/javascripts/spina/controllers/attachment_picker_controller.js
spina-2.3.5 app/assets/javascripts/spina/controllers/attachment_picker_controller.js
spina-2.3.4 app/assets/javascripts/spina/controllers/attachment_picker_controller.js
spina-2.3.3 app/assets/javascripts/spina/controllers/attachment_picker_controller.js
spina-2.3.2 app/assets/javascripts/spina/controllers/attachment_picker_controller.js
spina-2.3.1 app/assets/javascripts/spina/controllers/attachment_picker_controller.js
spina-2.3.0 app/assets/javascripts/spina/controllers/attachment_picker_controller.js