Giter Site home page Giter Site logo

Comments (1)

aduh95 avatar aduh95 commented on May 25, 2024

I would expect updates to the [props] attribute of <uppy-dashboard> to be picked up; and for the new value of {disabled: false} to enable interactivity.

Interestingly, the value is picked up, you can see if you replace the uppy.setOptions with

uppy.getPlugin('angular:Dashboard')!.setOptions(this.uppyOptions());

then the second button doesn't have any more effect than changing the props. However, if we change it to

(uppy.getPlugin('angular:Dashboard') as any).setPluginState({})

Then it works the same as calling uppy.setOptions(). The bug seems to be that Dashboard (and maybe other UI components are also affected) does not re-render when setOptions is called. On the Uppy class, some custom logic was added to take this behavior into account, maybe we should do the same on Dashboard/UIPlugin:

// Note: this is not the preact `setState`, it's an internal function that has the same name.
this.setState(undefined) // so that UI re-renders with new options

//cc @Murderlon

from uppy.

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.