What product/components do you use and which version/fix level?
1011.0.12
Are you using a free trial or a product with a customer license?
What are trying to achieve? Please describe in detail.
I would like to remove action bar item from Cockpit app, specifically “Add group” button on Groups page.
I tried it with extending ActionBarService but I didn’t succeed.
This is snippet of my code:
@Injectable({
providedIn: 'root'
})
export class CustomActionBarService extends ActionBarService{
constructor(injector: Injector, router: Router){
super(injector, router);
this.items$ = this.items$.pipe(
tap((actions) => console.log("actions ", actions)),
map(actions => {
return actions.filter(({ template }) => {
let ele = template;
if(template._projectedViews) {
ele = template._projectedViews[0].nodes.find(view => !!view).renderElement;
} else {
return true;
}
return !ele.querySelector("button[title='Add group']");
})
})
);
}
}
Do you get any error messages? Please provide a full error message screenshot and log file.
Button is still there.
Am I missing something? Is there another way to implement this?
Thank you