You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any other way to pass child methods to the parent without passing them in the props of the slot?
My use case is that I have an autocomplete input component as the user type it shows some suggestion, it contain some functionalities that I don't wanna rewrite in the parent showing the autocomplete on focus hiding it on blur, I just need to customize the look of it using slot.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there any other way to pass child methods to the parent without passing them in the props of the slot?
My use case is that I have an autocomplete input component as the user type it shows some suggestion, it contain some functionalities that I don't wanna rewrite in the parent showing the autocomplete on focus hiding it on blur, I just need to customize the look of it using slot.
Here is an example: https://codesandbox.io/s/scoped-slots-child-method-in-parent-qzn7k8
Beta Was this translation helpful? Give feedback.
All reactions