Skip to content

How to forward all child component methods to parent component? #6753

Answered by MrXieH
yoyo837 asked this question in Help/Questions
Discussion options

You must be logged in to vote

Why do it?
Is this okay?

defineExpose({
  getFormRef() { return formRef.value }
})

// parent
x.getFormRef().reset()

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yoyo837
Comment options

@MrXieH
Comment options

@yoyo837
Comment options

Answer selected by yoyo837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants