Skip to content

Commit

Permalink
Add code to MsCodeValidationInput codeComplete emit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ironicbay committed Jul 19, 2024
1 parent 2e50353 commit 9d410fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/components/ms-input/MsCodeValidationInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const props = defineProps<{
}>();
const emits = defineEmits<{
(e: 'codeComplete'): void;
(e: 'codeComplete', code: Array<string>): void;
}>();
async function onPaste(event: ClipboardEvent): Promise<void> {
Expand Down Expand Up @@ -103,7 +103,7 @@ async function checkCode(): Promise<void> {
if (props.codeLength === codes.value.length) {
isFinalCodeValid.value = await props.validationFunction(codes.value);
if (isFinalCodeValid.value === true) {
emits('codeComplete');
emits('codeComplete', codes.value);
}
} else {
isFinalCodeValid.value = undefined;
Expand Down

0 comments on commit 9d410fa

Please sign in to comment.