Class: Katalyst::Tables::Query::ModalComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Katalyst::Tables::Query::ModalComponent
- Includes:
- HtmlAttributes, Frontend
- Defined in:
- app/components/katalyst/tables/query/modal_component.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #before_render ⇒ Object
-
#initialize(collection:) ⇒ ModalComponent
constructor
A new instance of ModalComponent.
Methods included from Frontend
#summary_table_with, #table_orderable_with, #table_pagination_with, #table_query_with, #table_selection_with, #table_with
Constructor Details
#initialize(collection:) ⇒ ModalComponent
Returns a new instance of ModalComponent.
15 16 17 18 19 |
# File 'app/components/katalyst/tables/query/modal_component.rb', line 15 def initialize(collection:, **) super(**) @collection = collection end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
13 14 15 |
# File 'app/components/katalyst/tables/query/modal_component.rb', line 13 def collection @collection end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
13 14 15 |
# File 'app/components/katalyst/tables/query/modal_component.rb', line 13 def url @url end |
Instance Method Details
#before_render ⇒ Object
21 22 23 24 25 |
# File 'app/components/katalyst/tables/query/modal_component.rb', line 21 def before_render collection.suggestions.each_with_index do |suggestion, index| with_suggestion(suggestion:, index:) end end |