Giter VIP home page Giter VIP logo

Comments (5)

bozazec avatar bozazec commented on September 24, 2024 1

I am facing the same problem.
Component is rendered properly, consuming local state variable which is empty array at the beginning.

After async loading of images this variable is updated in local state but it looks like ReactImageAnnotate component doesn't update.

I can manually refresh the annotator if there is a way.
Any comment on this?

from react-image-annotate.

seveibar avatar seveibar commented on September 24, 2024 1

Sorry for the delay getting back to this- somehow I missed it!

Yes this is a problem, we carefully memoize to optimize the component and it sometimes causes a refreshing bug.

The workaround until this is fixed is to set a key={imageUrl} on the annotator. Whenever the key changes the component will refresh.

Thanks and sorry for the delay!!

from react-image-annotate.

solix avatar solix commented on September 24, 2024 1

Hey @seveibar, I could fix the issue by adding images list to key prop like key = {this.state.images}, and then it was fine.

from react-image-annotate.

solix avatar solix commented on September 24, 2024

@seveibar could you elaborate more about this fix? I have the same issue when using react-image-annotate tool. I tried to add key={imageUrl} but it failed to load the new local images state!

I am getting the following error:
TypeError: Cannot read property 'regions' of undefined

from react-image-annotate.

seveibar avatar seveibar commented on September 24, 2024

Hey @solix, can you provide a code sandbox? I'm going to be taking a look at this soon and that could speed up the process!

from react-image-annotate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.