Posted 12 June 2025, 6:06 am EST - Updated 12 June 2025, 6:13 am EST
Hi Team,
I’m working with a dataset structured like the following (example shown below). As seen in the attached screenshot, some records have a grpPath value (e.g., ‘Localized grp’), while others have grpPath: null.
public data = [
{
grpPath: null,
path: 'About',
source: 'S-Catalog upload to database from file on 05-27-25 02:02 PM',
target: 'T-Catalog upload to database from file on 05-27-25 02:02 PM',
attritutes: [],
values: [],
approve: true,
isGrup : false
},
{
grpPath: null,
path: 'About_Prod#0',
source: 'S-Catalog upload to database from file on 05-27-25 02:02 PM',
target: 'T-Catalog upload to database from file on 05-27-25 02:02 PM',
attritutes: [],
values: [],
approve: true,
isGrup : false
},
{
grpPath: null,
path: 'About_Prod#1',
source: 'S-Catalog upload to database from file on 05-27-25 02:02 PM',
target: 'T-Catalog upload to database from file on 05-27-25 02:02 PM',
attritutes: [],
values: [],
approve: true,
isGrup : false
},
{
grpPath: null,
path: 'Description',
source: 'S-Catalog upload to database from file on 05-27-25 02:02 PM',
target: 'T-Catalog upload to database from file on 05-27-25 02:02 PM',
attritutes: [],
values: [],
approve: true,
isGrup : false
},
{
grpPath: 'Localized grp',
path: 'Prod_desc',
source: 'GS_CA',
target: null,
attritutes: [],
values: [],
approve: true,
isGrup : true
},
{
grpPath: 'Localized grp',
path: 'Multi_prod_desc#0',
source: 'GM_CA1',
target: null,
attritutes: [],
values: [],
approve: true,
isGrup : true
},
{
grpPath: 'Localized grp',
path: 'Multi_prod_desc#1',
source: 'GM_CA2',
target: null,
attritutes: [],
values: [],
approve: true,
isGrup : true
}
]
Currently, a group toggle icon is shown even when grpPath is null. However, I want to only show the toggle icon when grpPath has a non-null value (i.e., the row is part of a logical group like “Localized grp”). The toggle is working as expected when grpPath has a value, but it shouldn’t be shown otherwise.
Could you please guide me on how to conditionally hide the toggle icon for items with grpPath: null?
Please provide a working StackBlitz example to demonstrate the implementation, in Angular framework.
Thanks