question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-beautiful-dnd and Items with images (async sizing)

See original GitHub issue

First, thanks for the lib. I’m looking to move from react-virtualized. I’m liking what you have going on here!

I have a list that contains images. Currently, I do not cache the image height in the data payload, just the image URL. When I was following the example at https://virtuoso.dev/react-beautiful-dnd/ it has the whole HeightPreservingItem component with the data-known-size prop. In this example, the component gets measured before the image is loaded, but then after the image loads, there isn’t a resize for that item.

Is there a way you recommend triggering a resize for each item when there is an image load?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
petyosicommented, Feb 9, 2021

@russelldc thanks. This might be related to the way mode="virtual" is implemented (as it has react-window as an integration target). I will look into a reliable solution for the content measurement.

1reaction
ozsirmacommented, Feb 17, 2021

I did not encounter a problem. Nice to see the new approach works. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-beautiful-dnd and Items with images (async sizing)
I have a list that contains images. Currently, I do not cache the image height in the data payload, just the image URL....
Read more >
Dragging not working using SSR after refresh #1854 - GitHub
I should be able to always pick up draggable items. Actual behavior. Receiving the following errors when trying to run react-beautiful-dnd with ...
Read more >
How to implement drag and drop in React with React DnD
The most common use cases for drag and drop in React include uploading files, moving items between multiple lists, and rearranging images ......
Read more >
Dynamically Update Positions During Drag Using react ...
In this case, it's having the positions of items dynamically display during the drag action, as shown below! Let's get to it! What...
Read more >
React beautiful DnD drag out of position problem
Does anyone know why my draggable item gets out of position? The only css I'm using is bootstrap and the ones in my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found