I have a multiselect with a 'clear all X' icon absolutely positioned to the right inside the .k-multiselect element. Everything works fine except I can not seem to stop the event from bubbling up to the open event when clicking. I do not want the list to open when clicking the close icon.
I considered filtering the target from the open event but could not find e.target inside the open event. Any ideas??
01.
$(
"#multiSelector"
).kendoMultiSelect({
02.
dataTextField:
"text"
,
03.
dataValueField:
"id"
,
04.
dataSource: orgAccountsData,
05.
dataBound:
function
() {
06.
var
$closeBtn = $(
"<span />"
, {
07.
id:
"multiselectCloseBtn"
08.
});
09.
10.
$(
".k-multiselect"
).append($closeBtn);
11.
12.
$(
"#multiselectCloseBtn"
).off(
"click"
).on(
"click"
,
function
(e) {
13.
e.stopPropagation();
14.
e.preventDefault();
15.
16.
$(
'#multiSelector'
).data(
"kendoMultiSelect"
).value([]);
17.
});
18.
}
19.
});