97732 Context help toggle button only appears when there is at least one element with a tooltip on the page

This commit is contained in:
Koen Pauwels
2023-01-27 11:59:24 +01:00
parent e717e610f9
commit bceca43580
6 changed files with 17 additions and 33 deletions

View File

@@ -54,9 +54,9 @@ export class ContextHelpService {
/**
* Observable that yields true iff there are currently no context help entries in the store.
*/
contextHelpEmpty$(): Observable<boolean> {
tooltipCount$(): Observable<number> {
return this.store.pipe(select(allContextHelpSelector))
.pipe(map((models: ContextHelpModels) => Object.keys(models).length === 0));
.pipe(map((models: ContextHelpModels) => Object.keys(models).length));
}
/**