Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
Howto implement table / -detail with customizable javascript-code in the detail with Webcomponents

I'm not a particular clever frontend-dev but i need to maintain and enhance two webcomponents which are used to show a table and rows in that table.

It worked fine so far. The table-element is querying a json-api on the server-side and it's creating <tx-row> elements on the fly like:

for (let tx of txlist) {
       let txRow = document.createRange().createContextualFragment(`
         <tx-row
          data-price="${this.price ? this.price : 0}"
          // many more attributes here
         </tx-row>
       `)
       this.tbody.append(txRow);
       // ...
}

So now i want to adjust that and make it reusable. In my case i want to add an optional first column where each row gets a checkbox which should call some javascript code.

If this would only be one component, slots would probably already solved my issue. However here i would need to somehow pass the slot further down in the tx-row and it doesn't sound like rocket-science but rather something very simple but i can't figure it out.

If this is easy if i would use XYZ-framework, i really hope that this framework is pretty slim. You know ... frontend-developmenet doesn't look to me as it would have evolved much from the state of 2016.

But nevertheless, any hint highly appreciated! E.g. if anyone can point to a place where something similiar is solved already.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda