katalyst-tables 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc97f1a686a28e4542c65f076afde15d61523726efb4dcaa3586e6c945121c13
4
- data.tar.gz: 10eee025b9e0daee5d3aeda7a78625e6491d91d02f99bf831092072845276185
3
+ metadata.gz: 187059d630f338d5bcdd0ecc98eb3850fa7d4d01e6d37f0918143873c7a50033
4
+ data.tar.gz: ac469214c3cdcf72b97ec5e5ab973356307d4d218d13face3ed48a82f9c09035
5
5
  SHA512:
6
- metadata.gz: 2a7e06d525551918f60e7b9a225f4ddb34bb3eeaeaecde37e817d0c61ade348f52e290235b21e84bedc72c92615f81e1226a10305242ff3e95e33fbb47a21878
7
- data.tar.gz: 2d23b372c056506b054c02165e7191eb73d00f76df054e0d70eafbd88d6979126a3803c11bef29889f9095f644c7e40b30396da8d48580239978a7c9ee795019
6
+ metadata.gz: 0a134c643f8780ff95287de876492b356adaa0e822b4fd72afe68980135859813cc5e9a1ac0c391bb227b27bc597a32c79266c1c88afcd005cc3186c3c30e27c
7
+ data.tar.gz: 5eb871b2122d8edd2e95724f52d8a073ff4109e8281aadb1b7e8df231dd1f00d1096de80af370f8a3a6b42bfa8b9025254e29e2e16fb18ccc488c56222bee61e
@@ -16,10 +16,6 @@ module Katalyst
16
16
  # Enhance a given table component class with orderable support.
17
17
  # Supports extension via `included` and `extended` hooks.
18
18
  def self.make_orderable(table_class)
19
- # Add `orderable` columns to row components
20
- table_class.header_row_component.include(HeaderRow)
21
- table_class.body_row_component.include(BodyRow)
22
-
23
19
  # Add `orderable` slot to table component
24
20
  table_class.config_component :orderable, default: "FormComponent"
25
21
  table_class.renders_one(:orderable, lambda do |**attrs|
@@ -37,6 +33,14 @@ module Katalyst
37
33
  Orderable.make_orderable(table.class)
38
34
  end
39
35
 
36
+ def initialize(**attributes)
37
+ super
38
+
39
+ # Add `orderable` columns to row components
40
+ header_row_component.include(HeaderRow)
41
+ body_row_component.include(BodyRow)
42
+ end
43
+
40
44
  def tbody_attributes
41
45
  return super unless orderable?
42
46
 
@@ -16,7 +16,7 @@ module Katalyst
16
16
  included do
17
17
  attr_accessor :items
18
18
 
19
- delegate :model, :to_model, :each, :count, :empty?, to: :items, allow_nil: true
19
+ delegate :model, :each, :count, :empty?, to: :items, allow_nil: true
20
20
  delegate :model_name, to: :model, allow_nil: true
21
21
  end
22
22
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Katalyst
4
4
  module Tables
5
- VERSION = "2.2.0"
5
+ VERSION = "2.2.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive