Accessing parent from nested repeat child component

I am trying to manipulate a table to include ‘invisible’ cells to accommodate colspan not being supported by DataTables however I’ve run into a roadblock that I hoped someone might be able to help with…

I have a repeat children expression on the table body which gives the required number of table row elements and have added another repeat children element on the table row tag to produce the required td elements. This all works fine but to get the relevant record to show in the cell I need the $index from both the row and tbody expressions.

If I use a dmx-repeat on the row I can access parent.$index to get the tbody index but, because my case uses the repeat children component

<tbody is="dmx-repeat" id="repeat1d1" dmx-bind:repeat="cond_admincentre.route_admmanage.conditional_formproj.sc_formproj.data.r_unallocbyryear.max('rowsreq')">
         <tr id="repunllocrows" is="dmx-repeat" dmx-bind:repeat="cond_admincentre.route_admmanage.conditional_formproj.sc_formproj.data.rep_acforms">
                  <td class="py-0" dmx-bind:colspan="$value.count()">
                             <span dmx-text="vc: {{$value.count()}} di:{{$index}} pdi:{{parent.$index}} dpdi:{{$parent.$index}} "></span>
                  </td>
                  <td class="d-none" dmx-repeat:invcells2="$value.count() > 1 ? $value.count() -1 : 0">
                  </td>
          </tr>
</tbody>

you can’t seem to navigate to the parent.
I have tried parent.$index with no success - can you do this with repeat children?

The difficulty is that I need the repeat to apply to the cell that shows the data and has a colspan value as well as producing the relevant quantity of hidden cells - hence why the repeat children (not repeat) is required.

Community Page
Last updated: