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" let allowedSymbols = " +()1234567890"
for (var symbol of manager.phone_number) { for (var symbol of manager.phone_number) {
console.log(symbol)
if (allowedSymbols.indexOf(symbol) == -1) { if (allowedSymbols.indexOf(symbol) == -1) {
showPhoneNumberInvalid = true showPhoneNumberInvalid = true
return return

View File

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

View File

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