kotlinx.html icon indicating copy to clipboard operation
kotlinx.html copied to clipboard

TR shouldn't use TBODY as a receiver

Open reubenfirmin opened this issue 1 year ago • 1 comments
trafficstars

I get that you are trying to force valid html, but that defeats the ability to create html fragments.

Consider the use case:

  • I have a table of the first N search results
  • I'm using HTMX's reveal to dynamically append additional rows of results (using hx-swap = afterend on the tbody)

Because of the way TR is defined, I cannot dynamically generate a list of TRs, which htmx will take care of appending. (Instead I have to create my own custom element for this, as a workaround, which is sub-par.)

reubenfirmin avatar Jun 14 '24 14:06 reubenfirmin

I agree it's less than ideal, perhaps a type of "fragment" receiver that any component can be defined under.

Another workaround I see in the wiki is to use a filter if you want to build the necesary parents than define the ones you want to strip out

rromanowski-figure avatar Sep 09 '24 14:09 rromanowski-figure

I also just ran into this problem. I would like a more flexible method to be able to generate HTML fragments for HTMX specifically.

dkowis avatar Aug 03 '25 19:08 dkowis