In my current project, I am working on a feature that requires a single component to display data from different tables based on the menu item clicked.
Using Observables, I have implemented the same component for both the Units and Colors modules.
1) When I click on Units in the first screenshot, it successfully displays the correct data in the grid. https://i.sstatic.net/EOMRD.png
2) However, when I click on Colors in the second screenshot, the grid data should update accordingly. Unfortunately, it is not updating or triggering any controller or API calls to the server. https://i.sstatic.net/zqEtD.png
I have already tried implementing change detection using ChangeDetectorRef and ngDoCheck, but without success.
Here's a snippet of my code for the component:
export class ListMasterMainComponent implements OnInit
{
// Component properties and methods...
}
For handling Menu Item Click:
onClickMainMasters(message)
{
// Logic for changing message and URL based on menu item clicked...
}
Any assistance would be greatly appreciated. Thank you.