RED-10509: added disableStopPropagation option for action config.
This commit is contained in:
parent
7c6f9fc25e
commit
ae0eebcc6f
@ -1,9 +1,10 @@
|
||||
import { BaseHeaderConfig } from './base-config.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { OverlappingElement } from '../../../help-mode';
|
||||
|
||||
export interface ActionConfig extends BaseHeaderConfig {
|
||||
readonly action: ($event: MouseEvent) => void;
|
||||
readonly helpModeKey?: string;
|
||||
readonly disabled$?: Observable<boolean>;
|
||||
readonly disabled?: boolean;
|
||||
readonly disableStopPropagation?: boolean;
|
||||
}
|
||||
|
||||
@ -3,6 +3,5 @@ import { ActionConfig } from './action-config.model';
|
||||
|
||||
export interface ButtonConfig extends ActionConfig {
|
||||
readonly type?: IconButtonType;
|
||||
readonly disabled?: boolean;
|
||||
readonly tooltip?: string;
|
||||
}
|
||||
|
||||
@ -63,10 +63,11 @@
|
||||
<iqser-circle-button
|
||||
(action)="config.action($event)"
|
||||
[buttonId]="config.id"
|
||||
[disabled]="config.disabled$ && (config.disabled$ | async)"
|
||||
[disabled]="config.disabled"
|
||||
[icon]="config.icon"
|
||||
[tooltip]="config.label | translate"
|
||||
[attr.help-mode-key]="config.helpModeKey"
|
||||
[iqserDisableStopPropagation]="config.disableStopPropagation"
|
||||
></iqser-circle-button>
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ import { List } from '../../utils';
|
||||
import { IListable } from '../models';
|
||||
import { ActionConfig, ButtonConfig, SearchPosition, SearchPositions } from './models';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { DisableStopPropagationDirective } from '../../directives';
|
||||
|
||||
@Component({
|
||||
selector: 'iqser-page-header',
|
||||
@ -33,6 +34,7 @@ import { MatTooltip } from '@angular/material/tooltip';
|
||||
TranslateModule,
|
||||
InputWithActionComponent,
|
||||
MatTooltip,
|
||||
DisableStopPropagationDirective,
|
||||
],
|
||||
})
|
||||
export class PageHeaderComponent<T extends IListable> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user