Sha256: 0fd587584b4ea9ed3adaa328c75f9572a061124a18a8913ceea0bcf0d7d2d9e4

Contents?: true

Size: 479 Bytes

Versions: 38

Compression:

Stored size: 479 Bytes

Contents

# typed: false
# frozen_string_literal: true

module Ariadne
  module Turbo
    module StreamAction
      class Component < Ariadne::BaseComponent
        option :component
        option :action, default: -> { "update" }

        def target
          @target ||= component.component_id
        end

        def turbo_action
          @turbo_action ||= empty? ? "update" : action
        end

        def empty?
          action == "drop"
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.85 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.84 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.83.3 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.83.2 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.83.1 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.83 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.82 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.81 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.80.3 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.79.2 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.79.1 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.79 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.78 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.77 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.76.1 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.76 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.75 app/components/ariadne/turbo/stream_action/component.rb
ariadne_view_components-0.0.74.1 app/components/ariadne/turbo/stream_action/component.rb