Sha256: 3d19f7d46511d9ff87bfb952d9e8e343df4e4d799f4121a349a8c71802d6b228
Contents?: true
Size: 841 Bytes
Versions: 3
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true module Phlexi module Table module Components class ActionsColumn < Base include Phlexi::Table::Components::Concerns::DisplaysHeader def initialize(*, **, &block) raise ArgumentError, "block is required" unless block.present? super(*, **) @block = block end def label(label = nil) if label.nil? options[:label] else options[:label] = label self end end def render_actions(object) @block.call(object) end def dom_id "#{super}_actions_cell" end def data_cell_attributes(object) @attributes end def type = "actions" def alignment = nil end end end end
Version data entries
3 entries across 3 versions & 1 rubygems