1
0

Re-select process id on selecting different process

This commit is contained in:
Rokas Puzonas 2023-04-23 12:13:51 +03:00
parent 9c8db5e7c8
commit 38a201baef
3 changed files with 7 additions and 2 deletions

View File

@ -38,7 +38,6 @@
let allowedSymbols = " +()1234567890"
for (var symbol of manager.phone_number) {
console.log(symbol)
if (allowedSymbols.indexOf(symbol) == -1) {
showPhoneNumberInvalid = true
return

View File

@ -108,7 +108,6 @@
primaryButtonText="Confirm"
secondaryButtonText="Cancel"
on:open
on:close={() => console.log("close")}
on:click:button--secondary={closeModal}
on:submit={async () => {
let valid = dispatch("validateModal", undefined, { cancelable: true })

View File

@ -44,6 +44,12 @@
selectedAdd = getAvailableProcessess()[0]
}
}
function onRowSelect(event) {
if (event.detail.selectedId == selectedAdd) {
selectedAdd = getAvailableProcessess()[0]
}
}
</script>
<div>
@ -53,6 +59,7 @@
<Dropdown
class="flex-grow"
bind:selectedId={id}
on:select={onRowSelect}
items={allProcessItems.filter(item => item.id == id || !processess.includes(item.id))}
/>
<Button