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.9.9 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.8 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.7 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.6 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.5 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.4 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.3 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.2 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.1 app/javascript/controllers/refine/stored-filter-controller.js
refine-rails-2.9.0 app/javascript/controllers/refine/stored-filter-controller.js