Sha256: 7abc7a486468ea292843c371834a8294adabf444e4f660df8df970bd7ef4480b
Contents?: true
Size: 727 Bytes
Versions: 30
Compression:
Stored size: 727 Bytes
Contents
import { Controller } from "@hotwired/stimulus" import { FetchRequest } from '@rails/request.js' /* attach to a link element to have it request turbo stream responses <a href="/contacts" data-controller="refine--turbo-stream-link" data-action="refine--turbo-stream-link#get">Click me</a> Turbo is supposed to handle this natively with data-turbo-stream but we're seeing issues using that attribute inside iframes */ export default class extends Controller { async visit(event) { event.preventDefault() const request = new FetchRequest( (this.element.dataset.turboMethod || "GET"), this.element.href, { responseKind: "turbo-stream", } ) await request.perform() } }
Version data entries
30 entries across 30 versions & 1 rubygems