polaris_view_components 1.4.1 → 1.4.3

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: '07659b2a6fedf1e3d426e3e8a33ecbafc0e178d26604015f5deb4746764c42cb'
4
- data.tar.gz: 0b78c075f082486d601be0902ae6c3a92641afd5d0261001cd624955011eb31d
3
+ metadata.gz: 555149c6949f974f11123a0352ea5ee542f009cdb72a3e1ec40d90606246f63a
4
+ data.tar.gz: d8c5aa60326db84ae86a498b509a7b6f1ce2e96756959120727058c280e45c56
5
5
  SHA512:
6
- metadata.gz: a531b52c1a89c77a993d67fdb4c55f176f71fbf91bd7d09705a9ee2e0fda2b0a34c078b05ee42b5c85ff023f2db1995e0646572791bb49911378756ba560f8bc
7
- data.tar.gz: be96664525ff3f02851bc178990b53eb982fb30764888aff42e0e5323552297867291cdbca3dc6e40fdfc5cfa1384d13e679267836d80ce1a8759957b1dd54c5
6
+ metadata.gz: 7b98f3d1bb4f31dae70956856619ad487e3fef53d0a1bd87b7040d9a4916c8d6263531b48ba8c1e992d8ccca7ddede687b7c0309be826900313861d436591ec1
7
+ data.tar.gz: 36130d894dac5b9d13f7f3ec99da8cd2cf018cf99a2a39d8915eae75201b41fc337f61dc2425465b6ccd9280d92ac1130942edf2816200a4bd4444eb78ba6f18
@@ -143,10 +143,6 @@ module Polaris
143
143
  polaris_text_field_target: "input"
144
144
  }
145
145
  }
146
- if @clear_errors_on_focus
147
- append_option(default_options[:data], :action, "focus->polaris-text-field#clearErrorMessages")
148
- end
149
-
150
146
  if @type == :number
151
147
  default_options.merge!({
152
148
  step: @step,
@@ -166,6 +162,9 @@ module Polaris
166
162
  "Polaris-TextField--monospaced": @monospaced,
167
163
  "Polaris-TextField__Input--suffixed": @suffix.present?
168
164
  )
165
+ if @clear_errors_on_focus
166
+ prepend_option(opts[:data], :action, "focus->polaris-text-field#clearErrorMessages")
167
+ end
169
168
  prepend_option(opts[:data], :action, "polaris-text-field#syncValue")
170
169
  end
171
170
  end
@@ -16,7 +16,12 @@ module Polaris
16
16
  model: object.class.model_name.human.downcase
17
17
  )
18
18
 
19
- render Polaris::BannerComponent.new(title: title, status: :critical, within: :container) do |banner|
19
+ render Polaris::BannerComponent.new(
20
+ title: title,
21
+ status: :critical,
22
+ within: :container,
23
+ data: {errors_summary: true}
24
+ ) do |banner|
20
25
  [
21
26
  render(Polaris::ListComponent.new) do |list|
22
27
  object.errors.full_messages.each do |error|
@@ -1,5 +1,5 @@
1
1
  module Polaris
2
2
  module ViewComponents
3
- VERSION = "1.4.1"
3
+ VERSION = "1.4.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polaris_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Gamble
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-04 00:00:00.000000000 Z
12
+ date: 2024-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails