pg_rails 7.0.8.pre.alpha.78 → 7.0.8.pre.alpha.79

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: 871482c5c249da4284c330d128e8f9d3bb456ba55b2b434fd5ae7f7620402643
4
- data.tar.gz: e12f78759a856ebd5f020f44e744e5d894fa5e5cba3e6fcc97751d3df6eecdaf
3
+ metadata.gz: d09fbc215c11289297d4f68d0c757492382490591e45e555ad6bd9347dd5a48f
4
+ data.tar.gz: 31677fedfd7ff1eb0d02fdaf038f1b97995b979d96ba066ba4bad6f2c87a60ab
5
5
  SHA512:
6
- metadata.gz: 2259c319165804262def78cfb9ea6fb60eb9d3ac813b85f2787c9388aa0127dd905019c964b4fece97ca8a193ac514205b1768f51eac850a78c40c8ce7719503
7
- data.tar.gz: 216652a6d27af8b4f17fffa6799215dd07d2d960483e40141f0d12db189558f1234c77138ed8e3939e9c99112c7b52832d0634bb47e9c73a494097d6d516a227
6
+ metadata.gz: 52cc06a4a2e3843abc3fbe5344bc913276556c8bbc9f0945f10843c188ad92e92e02955738715a18e4f09526e4759d0db716fef414941a086eda36347279e312
7
+ data.tar.gz: 712ff73b644360b0f05f133d172af8cb3a827116439ea10352b56272313b4e06a39092f322e666569609c7b0ab173e3f1ab1f2ddb3ae6e37e1e5964baa8c660d
@@ -172,15 +172,18 @@ export default class extends Controller {
172
172
  }
173
173
 
174
174
  mostrarError () {
175
- // TODO: link a contacto
176
- this.subWrapper.innerHTML = renderToStaticMarkup(
177
- <div className="resultados" tabIndex={-1}>
178
- <div className="text-center p-2 text-danger d-flex align-items-center">
179
- <i className="bi-exclamation-circle me-2"></i>
180
- Ocurrió algo inesperado. Por favor, intentá nuevamente o ponete en contacto con nosotros.
175
+ if (this.element.querySelector('.resultados .spinner-border')) {
176
+ Rollbar.error('Time out de asociable.js')
177
+ // TODO: link a contacto
178
+ this.subWrapper.innerHTML = renderToStaticMarkup(
179
+ <div className="resultados" tabIndex={-1}>
180
+ <div className="text-center p-2 text-danger d-flex align-items-center">
181
+ <i className="bi-exclamation-circle me-2"></i>
182
+ Ocurrió algo inesperado. Por favor, intentá nuevamente o ponete en contacto con nosotros.
183
+ </div>
181
184
  </div>
182
- </div>
183
- )
185
+ )
186
+ }
184
187
  }
185
188
 
186
189
  setMaxHeight () {
@@ -258,8 +261,14 @@ export default class extends Controller {
258
261
  this.lastValue = this.input.value
259
262
 
260
263
  const timerBuscandoId = setTimeout(() => {
264
+ // console.log(`timed out ${timerBuscandoId}`)
261
265
  this.buscando()
262
266
  }, 200)
267
+ // console.log(`setTimeOut ${timerBuscandoId}`)
268
+ document.addEventListener('turbo:before-stream-render', (i) => {
269
+ // console.log(`clear before stream render ${timerBuscandoId}`)
270
+ clearTimeout(timerBuscandoId)
271
+ }, { once: true })
263
272
  const timerErrorId = setTimeout(() => {
264
273
  this.mostrarError()
265
274
  }, 15000)
@@ -1,7 +1,6 @@
1
- / # locals: (collection:, query:, field_name: nil, timeout_id: nil)
1
+ / # locals: (collection:, query:, timeout_id:, field_name: nil)
2
2
  .resultados.inline tabindex="-1"
3
- - if timeout_id.present?
4
- div data-controller="clear-timeout" data-timeout-id="#{timeout_id}"
3
+ div data-controller="clear-timeout" data-timeout-id="#{timeout_id}"
5
4
  ul.list-group.list-group-flush
6
5
  - if collection.any?
7
6
  - collection.each do |object|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.78'
4
+ VERSION = '7.0.8-alpha.79'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.pre.alpha.78
4
+ version: 7.0.8.pre.alpha.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso