将一个kendo-combobox置于KendoPanelBarItemTitle中,并且组合框无法正常工作
看起来标题正在捕捉所有事件
以下示例
<kendo-panelbar-item [title]="'Copy from Existing Scenarios'" color="secondary" expanded="true">
<ng-template kendoPanelBarItemTitle>
<span fxFlex></span>
<label style="margin:5px 5px 0 0">Source: </label>
<kendo-combobox
fxFlex="100"
[data]="otherScenarios | async"
[valuePrimitive]="true"
[textField] ="'Name'"
[valueField] = "'ScenarioId'"
class="mr-1"
placeholder="Source"
[disabled]="!copyFromExpanded"
[(ngModel)]="sourceScenarioId"
name="SourceScenarioId">
</kendo-combobox>
</ng-template>
<ng-template kendoPanelBarContent>
stuff here
</ng-template>
</kendo-panelbar-item>
&#13;
答案 0 :(得分:0)
如果您需要阻止标题在某些子元素上捕获鼠标单击事件,请创建并使用appClickStopPropagation
指令(如何创建一个:https://stackoverflow.com/a/41001184/9871385)。
<ng-template kendoPanelBarItemTitle>
Click on me to toggle kendoPanelBarItem.
<some-element appClickStopPropagation>Click on me and nothing toggles.</some-element>
</ng-template>