I'm using the VMWare Clarity Datagrid component.
Description:
I have two datagrids and I managed to expand the right one (blue) when expanding one of the rows of the left datagrid (red).
My GOALS:
display: none;
rule in the .datagrid .datagrid-expandable-caret
class in the browser it works fine but in the .scss file it doesn't.Here I made a plunker with the example in angular2+.
.right-div {
float: left;
height:315px;
width: 500px;
border: 4px solid cornflowerblue;
.datagrid .datagrid-expandable-caret {
padding: 2px 4px 3px;
text-align: center;
display: none;
}
}
Thanks for every suggestion.
The reason it doesn't work when adding it to your own component's styles is that the .datagrid-expandable-caret
element is in the datagrid's shadow DOM. See https://angular.io/guide/component-styles#view-encapsulation for more explanation.
What that means is you have 2 solutions, which are equivalent:
encapsulation: ViewEncapsulation.None
on your component to achieve the same result.Here is an updated version of your plunker that shows the second solution working: https://plnkr.co/edit/ss3y1P?p=preview