Sha256: e3493cd347b36ee07f25614839a75479b0cfd6c4ea731a847548b452418b1ba2

Contents?: true

Size: 218 Bytes

Versions: 9

Compression:

Stored size: 218 Bytes

Contents

import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  connect() {
    if (this.autoselect) this.element.select()
  }

  get autoselect() {
    return this.element.autofocus
  }
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
css-zero-0.0.44 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.43 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.42 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.41 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.40 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.39 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.38 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.37 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.36 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js