Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
w2ui nuevo sistema de eventos (w2base) devuelve el error preventDefault

Trabajando con las últimas fuentes w2ui de github. En eventos de cuadrícula (editField, cambio, etc.) estoy usando el evento preventDefault. Devuelve error:

 Uncaught (in promise) undefined preventDefault @ w2base.js:52 grido_pries_keitima @ prg_gridai.js:405 (anonymous) @ prg_gridai.js:146 trigger @ w2base.js:213 editField @ w2grid.js:3129 ... function grido_pries_keitima( obj, event ) { let gid = obj.grido_id, fld = w2ui[ gid ].columns[ event.detail.column ].field, ftp = w2ui[ gid ].columns[ event.detail.column ].editable.type, tid = w2ui[ gid ].columns[ event.detail.column ].editable.tid, v = ( tid == '' ? -1 : findElement( visi_tipai, "tipo_id", tid ) ), etp = ( v == -1 ? '' : visi_tipai[ v ].tipo_tipas ), ind = obj.grido_lenta.nauji_patikr if ( ind && ind == fld ) { pranesk( 'mine message ..." ) event.preventDefault() // stopPropagation() }

Con stopPropagation está funcionando...

Evento :

 w2ui[ gid ].on( { type: 'editField', execute: 'before' }, ( target, event )=>{ grido_pries_keitima( obj, event ) } )

Probado y con el último parámetro "verdadero":

 w2ui[ gid ].on( { type: 'editField', execute: 'before' }, ( target, event )=>{ grido_pries_keitima( obj, event ) }, true )

el mismo resultado...

w2base.js:

 preventDefault() { this._reject() // 52 row here this.isCancelled = true }

Extraño, que en otro evento de cuadrícula -

 w2ui[ gid ].on( { type: 'keydown', execute: 'before' }, ( target, event )=>{ grido_keydw( obj, event ) })

y dentro de la función grido_keydw, preventDefault está funcionando bien...

¿Qué es eso malo? Gracias por adelantado ...

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!