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

349
Views
Zing Grid elimina la API de eliminación en la selección de filas, borra las filas seleccionadas al actualizar y establece el título sobre el texto del elemento seleccionado de la API

Por lo tanto, me baso en mis pruebas anteriores en nuestro proyecto usando Zing Grid api y estoy buscando una manera de eliminar la API de eliminación incorporada que aparece cuando selecciona un conjunto de columnas con el atributo type="selector" :
Cuando configuro el texto del subtítulo personalizado, el botón API desaparece, pero esto también elimina el cuadro de búsqueda. ¿Cómo elimino el botón Eliminar API?

 const zgRef = document.querySelector('zing-grid#zgRefTable'); zgRef.querySelector("zg-caption").textContent = "Custom Text";

Cómo borrar el conjunto de atributos de las columnas seleccionadas con type="selector" después de ejecutar el método refresh() :
Escucho el evento row:select y rowIndex el índice de fila en una matriz y justo antes de ejecutar el método refresh() borro la propiedad zing-grid aSelectedRows . Esto parece un poco raro. ¿Cómo borro las filas seleccionadas?

 var rowIdx = []; // Row select event zgRef.addEventListener('row:select', function(e) { e.preventDefault(); const checked = e.detail.ZGData.checked; const idx = e.detail.ZGData.rowIndex; if (checked && !rowIdx.includes(idx)) { rowIdx.push(idx); } else if (!checked && rowIdx.includes(idx)) { rowIdx = rowIdx.filter(x=>x!=idx); } }); // Refresh button document.getElementById("refreshBtn").addEventListener("click", (e)=>{ e.preventDefault(); if (rowIdx.length>0) { rowIdx.forEach((element)=>{ // reset selected rows before refresh const r = zgRef.row(element); r.widget.aSelectedRows = []; }); rowIdx = []; } zgRef.refresh(); // refresh });

Si selecciona una columna, la API cambia automáticamente el título a x Item Selected . ¿Cómo configuro un texto de subtítulo personalizado que sobrescriba el texto del x Item Selected ? Probé el método setCaption() pero concatena el texto existente a api Custom Text\nx Item Selected text.

 var customTxt = "Custom Text" // Tried zgRef.setCaption(customTxt); // Also tried zgRef.querySelector("zg-caption").textContent = customTxt; // This changes the text but removes search box
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!