view_component_reflex 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01c4ace6204896ecf089f5a494cad173b1bf73c1f5818bd5745dbaf976c3adec
4
- data.tar.gz: 24d655b966c025128802e4f2223cf7e324f4d15ecfc7c3554bd6cdeb10224aad
3
+ metadata.gz: d6da4b2d9e532fefeb33b06d18081a1be6a281545a7716dc0650f2e5facd44d3
4
+ data.tar.gz: f267ea6850f2fd12250d19af6183ca4b48266b38c37d0486375efa11871ab391
5
5
  SHA512:
6
- metadata.gz: 47efa7af3e0dbb78e86e5dd513e79dc3722279b69204c5a4c7385da717e6207b20587dc3e680659f48d56e19afa0e01800614a2c3a6f5f5672b426d40019d374
7
- data.tar.gz: c7e0a43ac12fa4bf42615c9469b108945b59a2d9f8b8c0890f772c8b2ca193cf5551c771f064df8ac7f200a80293795dd35476929f6543f21b7f2a98e52dd127
6
+ metadata.gz: 9bfecb324ea02fc969beba3a393752d73881a6fd917e16bcbbc49a0082113c46c4a2a0c27e1c2f9a8eb501f6429b992a0eff4ce078cc32ebc87cec1f589f0612
7
+ data.tar.gz: 45b0510fea9923a7edc82eef3ade6d01459134627c9e505c0c92aadd2c16be05c11ab08aa9220e363d3ee79b8f73a9885138777f963b9e38bf4252178312a3f4
@@ -23,7 +23,8 @@ module ViewComponentReflex
23
23
  cable_ready[channel.stream_name].morph(
24
24
  selector: s,
25
25
  html: html.inner_html,
26
- children_only: true
26
+ children_only: true,
27
+ permanent_attribute_name: "data-reflex-permanent"
27
28
  )
28
29
  end
29
30
  end
@@ -39,10 +40,12 @@ module ViewComponentReflex
39
40
  element.dataset[:key]
40
41
  end
41
42
  end
43
+ document = Nokogiri::HTML(controller.render_component_to_string(component))
42
44
  cable_ready[channel.stream_name].morph(
43
45
  selector: selector,
44
- children_only: false,
45
- html: controller.render_component_to_string(component)
46
+ children_only: true,
47
+ html: document.css(selector).inner_html,
48
+ permanent_attribute_name: "data-reflex-permanent"
46
49
  )
47
50
  end
48
51
 
@@ -1,3 +1,3 @@
1
1
  module ViewComponentReflex
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component_reflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua LeBlanc