I have a usecase in which one of the cells in my row is a checkbox and another is radio button. I am using the grid row expander to replace contents of the row on expansion but the checkbox and radio button also gets replaced. I don't want this to happen.
I am looking for a way in which I can choose to replace only specific cells and not the entire row on using row expander.
<clr-datagrid>
<clr-dg-column>User ID</clr-dg-column>
<clr-dg-column [clrDgField]="'name'">Name</clr-dg-column>
<clr-dg-column>Allow access?</clr-dg-column>
<clr-dg-column>Default User</clr-dg-column>
<clr-dg-row *clrDgItems="let user of users; let index=index" [clrDgItem]="user">
<clr-dg-cell>{{user.id}}</clr-dg-cell>
<clr-dg-cell>{{user.name}}</clr-dg-cell>
<clr-dg-cell>
<div class="checkbox">
<input type="checkbox" id="access-{{index}}">
<label for="access-{{index}}"></label>
</div>
</clr-dg-cell>
<clr-dg-cell>
<div class="radio-inline">
<input type="radio" name="default-radios" id="default-{{index}}">
<label for="default-{{index}}"></label>
</div>
</clr-dg-cell>
<!-- Example using a wrapper component -->
<!--<detail-wrapper *clrIfExpanded ngProjectAs="clr-dg-row-detail" class="datagrid-row-flex"></detail-wrapper>-->
<clr-dg-row-detail *clrIfExpanded [clrDgReplace]="true">
<clr-dg-cell>{{user.id}}</clr-dg-cell>
<clr-dg-cell>{{user.name}}</clr-dg-cell>
<clr-dg-cell></clr-dg-cell>
<clr-dg-cell></clr-dg-cell>
</clr-dg-row-detail>
</clr-dg-row>
<clr-dg-footer>{{users.length}} users</clr-dg-footer>
</clr-datagrid>