I have a multiselect-dropdown.html
with it's own .js, as well as an edit-user.html
with it's own .js.
I'm trying to make it trigger a function in edit-user.html
when I click a checkbox or a list-item in the multiselect-dropdown.html
.
I find the aurelia docs a bit lacking in information.
I don't think I need to paste the js files, I just need direction on how to call a function in edit-user.html
from a list-item in multiselect-dropdown.html
is it possible? some hints would help.
<template>
<div class="dropdown">
<button id="${baseId}"
class="dropdown-toggle form-control input"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<span class="multiselect-dropdown-selection">${textCaption}</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu input"
aria-labelledby="${baseId}"
click.trigger="preventDropDownClose($event)">
<li if.bind="!disableOriginal">
<a>
<label>
<input
type="checkbox"
id="multiselect-dropdown-select-default"
checked.bind="isSelectOriginal">
${textSelectOriginal}
</label>
</a>
</li>
<li>
<a>
<label>
<input
type="checkbox"
id="multiselect-dropdown-select-all"
checked.bind="isSelectAll">
${textSelectAll}
</label>
</a>
</li>
<li role="separator" class="divider"></li>
<li repeat.for="option of options" onmousedown=>
<a>
<label>
<input // This should send a trigger to a function in edit-user.html
type="checkbox"
class="multiselect-dropdown-option"
checked.bind="option.checked"> ${option.name}
</label>
</a>
</li>
</ul>
</div>
</template>
Here is the multi-select in edit-user.html
, how do I call a function in edit-user.html
if a checkbox has been checked or unchecked in multiselect-dropdown.html
?
<div class="form-group user-multiselect-dropdown">
<label for="address" class="regular-15-25">Mina valda adresser</label>
<multiselect-dropdown
options.bind="selectedAddresses"
noun-singular="adress"
noun-plural="adresser">
</multiselect-dropdown>
</div>