Sha256: 98ed4587d95b7b279ef0a0abb5428821935fc1c22893d9b3ab122ca62e5fd64f

Contents?: true

Size: 216 Bytes

Versions: 49

Compression:

Stored size: 216 Bytes

Contents

import { Controller } from "@hotwired/stimulus"

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

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

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
css-zero-0.0.93 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.92 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.91 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.90 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.89 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.88 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.87 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.86 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.85 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.84 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.83 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.82 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.81 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.80 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.79 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.78 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.77 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.76 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.75 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js
css-zero-0.0.74 lib/generators/css_zero/add/templates/app/javascript/controllers/autoselect_controller.js