Hi Guys,
"Action" dropdown in the datatable works fine in users, tenants etc. but when incorporated in our components in the app/main path, the dropdown toggle doesn't work. I had to add this below code for the similar situation before v6.0.0 to main-routing.modules.ts to make it work.
constructor(private router: Router) {
router.events.subscribe(() => {
this.hideOpenDataTableDropdownMenus();
});
}
hideOpenDataTableDropdownMenus(): void {
let $dropdownMenus = $('.dropdown-menu.tether-element');
$dropdownMenus.css({
'display': 'none'
Now, after upgrade to 6.0.0 and $ clean up. seems like we cannot have this above code and removed it and added (which is in admin-routing.module.ts) below code.
constructor(
private router: Router
) {
router.events.subscribe((event) => {
if (event instanceof NavigationEnd) {
window.scroll(0, 0);
}
});
Nothing seems to work. Please need some help as soon as possible.
fyi, I did copy the same "Action" code what was in users datatable. added all the references BsDropdownModule in main.module.ts.
What else is missing? Appreciate your click reply.
Thanks
3 Answer(s)
-
0
adding BsDropdownModule from 'ngx-bootstrap' to the module fixed the issue.
-
0
could you please give me more detail. I have added but still not working.
-
1
@tugrulkarakaya, where did you add these below lines?
I have added to the .module.ts file below lines... Import { BsDropdownModule } from 'ngx-bootstrap'; and in @NgModule({ imports: [ BsDropdownModule.forRoot()