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

146
Views
no se pueden leer las propiedades de null (leyendo 'insertAdjacentHTML') mientras se actualiza la tienda

No se pueden leer las propiedades de null (leyendo 'insertAdjacentHTML') mientras se actualiza la tienda.

Estoy tratando de actualizar mi tienda manualmente cambiando algunos datos.

Aquí está mi código.

 updateFieldData: function (selectedDRecord) { if (selectedDRecord.id != undefined || selectedDRecord.id != null) { let _this = this; let groupkey = sessionStorage.getItem('groupKey'); var rowExapnaderGridData = Ext.ComponentQuery.query('#' + groupkey)[0].getStore(); // this is my gridstore var tempStore = []; var salesRowData = rowExapnaderGridData.getData().items; for (var i = 0; i < salesRowData.length; i++) { tempStore.push(salesRowData[i].data); } for (var i = 0; i < tempStore.length; i++) { tempStore[i].value = "somevalue"; } rowExapnaderGridData.loadData(tempStore); } },

Esto funciona bien durante la creación, pero cuando estoy actualizando recibo el siguiente error.

 Uncaught TypeError: Cannot read properties of null (reading 'insertAdjacentHTML') at ctor.insertHtml (ext-all.js?_dc=1654269040829:20:911890) at ctor.doInsert (ext-all.js?_dc=1654269040829:20:481469) at ctor.append (ext-all.js?_dc=1654269040829:20:481393) at ctor.refresh (ext-all.js?_dc=1654269040829:20:1600777) at ctor.refresh (ext-all.js?_dc=1654269040829:20:1619324) at ctor.refresh (ext-all.js?_dc=1654269040829:20:1862004) at ctor.refreshView (ext-all.js?_dc=1654269040829:20:1609433) at ctor.onDataRefresh (ext-all.js?_dc=1654269040829:20:1609149) at ctor.onDataRefresh (ext-all.js?_dc=1654269040829:20:1870226) at ctor.fire (ext-all.js?_dc=1654269040829:20:153709)

Revisé en otros lugares pero no obtuve mucho apoyo wrtExtJS.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El código se puede simplificar así:

 if (!Ext.isEmpty(selectedDRecord.id)) { const groupkey = sessionStorage.getItem('groupKey'), rowExpanderGridData = Ext.ComponentQuery.query('#' + groupkey)[0].getStore(); Ext.each(rowExpanderGridData, function(record) { record.set('fieldname', 'some value'); //'fieldname' is the field that you want to change; 'some value' the new value for it }); rowExpanderGridData.commitChanges(); }

Alternativamente, puede crear una nueva matriz de modelos y cargarlos en la tienda usando loadRecords() .

about 4 years ago · Juan Pablo Isaza Report
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!