svelte-pincode icon indicating copy to clipboard operation
svelte-pincode copied to clipboard

on:complete is called immediately upon component mount.

Open joepetrakovich opened this issue 3 years ago • 0 comments

I tried using on:complete but it gets called as soon as the component is bound. I had to resort to binding to the complete prop and reacting to it.

<script>
  const handlePinCompleted= async () => {
        console.log('called immediately');
    };
</script>

<Pincode bind:this={pinCodeComponent} bind:value={pinCodeValue} on:complete={handlePinCompleted} >
            <PincodeInput /><PincodeInput /><PincodeInput />
            <PincodeInput /><PincodeInput /><PincodeInput />
 </Pincode>

joepetrakovich avatar Apr 05 '23 21:04 joepetrakovich