Sha256: a0fa9259ab5662d2361a2449c987356b26666da94513b62cb1c783eb74c6e6a2

Contents?: true

Size: 534 Bytes

Versions: 80

Compression:

Stored size: 534 Bytes

Contents

import { Controller } from "@hotwired/stimulus";

export default class extends Controller {
  static targets = [
    "removeFileFlag",
    "downloadFileButton",
    "removeFileButton",
    "fileName"
  ];

  static values = { id: Number }

  removeFile() {
    if (this.hasDownloadFileButtonTarget) {
      this.downloadFileButtonTarget.classList.add("hidden");
    }

    this.removeFileButtonTarget.classList.add("hidden");
    this.fileNameTarget.classList.add("hidden");
    this.removeFileFlagTarget.value = this.idValue;
  }

}

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
bullet_train-fields-1.6.11 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.10 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.9 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.8 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.7 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.6 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.5 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.4 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.3 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.2 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.1 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.6.0 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.5.2 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.5.1 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.5.0 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.4.11 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.4.10 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.4.9 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.4.8 app/javascript/controllers/fields/file_item_controller.js
bullet_train-fields-1.4.7 app/javascript/controllers/fields/file_item_controller.js