Skip to content

[Help]: Resize children component with AutoHeight (when children component changes data). #893

Closed Answered by davidjerleke
juanpmd asked this question in Help
Discussion options

You must be logged in to vote

@juanpmd sorry I misunderstood the question. I think this solution should work (you can remove the watchResize option all together):

useEffect(() => {
  if (emblaApi) emblaApi.reInit() // Re-initialize Embla when you toggle open something (note the dependency displayError in the array)
}, [displayError, emblaApi])

Replies: 1 comment 3 replies

Comment options

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

@davidjerleke
Comment options

Answer selected by juanpmd
@juanpmd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
resolved This issue is resolved question Question about how to achieve something
2 participants