1

I have two Components.

In the second component, "date-detail-filter" I always keep track for boolean value, and want to access this data in my parent component.

1 Answer 1

2

do you know how to use $emit?

In your date-detail-filter component

you can add this to your method. this.$emit('your-event-name', 'your payload')

and in your main component.

<date-detail-filter @your-event-name="functionName()"/>

functionName(payload) {
   your logic here to hide the caret
}

$emit is used to pass data from child component to parent component via event.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.