EasyUI Forum

General Category => EasyUI for Angular => Topic started by: softboy99 on February 01, 2018, 03:28:06 AM



Title: How to check if a TabPanelComponent exits in the TabsComponent's panels list?
Post by: softboy99 on February 01, 2018, 03:28:06 AM
How to check if a TabPanelComponent exits in the TabsComponent's panels list by the TabPanelComponent's name?


Title: Re: How to check if a TabPanelComponent exits in the TabsComponent's panels list?
Post by: jarry on February 02, 2018, 12:58:35 AM
The TabPanelComponent has no 'name' property but you can call 'filter' method to find the component with the 'panels' property of the TabsComponent.
Code:
let tt = ...  // the TabsComponent object
let p = tt.panels.filter(p => ...);