Sha256: c0a2b0f059cbdc374dd6e51608a58f079247b7b52ae413f1792ea55df3e383bf

Contents?: true

Size: 811 Bytes

Versions: 30

Compression:

Stored size: 811 Bytes

Contents

import { Controller } from "@hotwired/stimulus"
import { filterStoredEvent } from '../../refine/helpers'

export default class extends Controller {
  static targets = ['blueprintField']
  static values = { formId: String, stateDomId: String }

  connect() {
    const stateController = document
      .getElementById(this.stateDomIdValue)
      .refineStateController
    this.blueprintFieldTarget.value = JSON.stringify(stateController.blueprint)
    console.log("connect", this.blueprintFieldTarget.value)
  }

  updateBlueprintField(event) {
    if (event.detail.formId != this.formIdValue) { return null }
    const { detail } = event
    const { blueprint } = detail
    this.blueprintFieldTarget.value = JSON.stringify(blueprint)
    console.log("update blueprint", this.blueprintFieldTarget.value)
  }
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
refine-rails-2.12.0 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.12 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.11 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.10 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.9 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.8 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.6 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.5 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.4 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.3 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.2 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.1 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.11.0 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.10.1 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.10.0 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.14 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.13 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.12 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.11 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.10 app/javascript/controllers/refine/stored-filter-controller.js