Git Product home page Git Product logo

Comments (7)

hackingharold avatar hackingharold commented on June 2, 2024 1

Hi @mpflanzer,

I understand this use case and will think about a possible solution. 👍🏼

from ngx-dropzone.

hackingharold avatar hackingharold commented on June 2, 2024 1

Hi @mpflanzer

I added a new mode property and released it with v17.1.0. Please test it out and see if this works for you.

from ngx-dropzone.

hackingharold avatar hackingharold commented on June 2, 2024

Hi @marcelimati,

thanks for your feature request. The current behavior is actually intended because the form/input state management should be handled by the library consumer. From the library perspective, I don't know how you store the selected files.

What exactly would be your use case for this?

from ngx-dropzone.

marcelimati avatar marcelimati commented on June 2, 2024

Actually nevermind, because I could just add to array file elements whenever input changes, for example I would add 2 files, two times. Then I would have total 4 files in my array, even though in this library array there are only 2. Then if I want to remove some files i would just splice my array, so don't need to make that change in the library.

Cheers.

from ngx-dropzone.

hackingharold avatar hackingharold commented on June 2, 2024

Yeah, that's exactly what I thought you would do. 👍🏼

from ngx-dropzone.

mpflanzer avatar mpflanzer commented on June 2, 2024

I have the same use case that I would like the behavior to be to add files instead of overwriting the previous ones. In my case the dropzone is part of a bigger form-group that is eventually going to be submitted.

The solution above works but it means I need to create an extra form control for the dropzone and copy file entries to the form control of the form group. More convenient would be to just use the form control that is already in the group and have an option to tell the dropzone to append to the form control it's using instead of just setting the value.

from ngx-dropzone.

mpflanzer avatar mpflanzer commented on June 2, 2024

Took me a bit longer, but it's working as expected for me. Thanks!

from ngx-dropzone.

Related Issues (9)

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.