Giter VIP home page Giter VIP logo

Comments (19)

rikschennink avatar rikschennink commented on May 22, 2024 14

@snuuve @rayax86 I just published version 1.4.0 which now has a allowRevert setting which defaults to true, set it to false to disable the undo feature.

from filepond.

remotemerge avatar remotemerge commented on May 22, 2024 4

I changed revert to null and updated the tap label. This works for my use case.

server: {
  revert: null,
},
labelTapToUndo: 'tap to close',

Between, I don't understand who looks for the file delete feature in the upload component? Still, thank you for the plugin.

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

What do you mean by Undo feature.

from filepond.

LMarcinkowski avatar LMarcinkowski commented on May 22, 2024

This button "undo"
image

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

It's currently not possible to disable this feature using configuration options (only the revert action that removes the temp file from the server can be disabled). Why do you want to disable it? What is the use case?

The only way currently to remove it is to hide it with CSS.

from filepond.

LMarcinkowski avatar LMarcinkowski commented on May 22, 2024

Because we don't want to let users delete files from this component

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

Existing files? I assume a user can remove files they themselves added?

from filepond.

LMarcinkowski avatar LMarcinkowski commented on May 22, 2024

Yes, but not from this component :)

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

Okay, thanks for clarifying! Final question, if you don't mind, how are you using FilePond? It helps to know the use case to determine how to best integrate this feature.

from filepond.

rayax86 avatar rayax86 commented on May 22, 2024

Please, this is very important. There are many many cases you just want to avoid this, for example whenever a file is uploaded, it is processed and takes effect immediately. It would be meaningless to allow the user to revoke this file.

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

@rayax86 That would mean there's no way for the user to alter the interface state? The file is uploaded and stays green? Is that correct?

from filepond.

rayax86 avatar rayax86 commented on May 22, 2024

@rikschennink That's the idea. Just need to show a tick in the button and don't register any onclick handlers on it.

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

@rayax86 The Just in your sentence is where the problem is. It's never just doing something. 😊

If I leave the button, it indicates the user can click it, but it won't do anything ( as it does not trigger any events ). The subtext shows to "tap to undo" but as there's no button there's nothing to tap. Removing the subtext makes the design look unbalanced, etc.

I've set up the situation on my dev machine but it's weird to upload a file and not be able to then remove it or revert your decision. It's like if this text box I'm typing this comment in would not allow me to use my backspace button.

from filepond.

rayax86 avatar rayax86 commented on May 22, 2024

@rikschennink Thanks for the update 👍

By "leaving the button" I actually mean "show something that looks the same as the button but don't allow the user to click it". Sorry I didn't make it clear.

As for your statement "It's like if this text box I'm typing this comment in would not allow me to use my backspace button", please consider cases similar to Google Instant: whenever you type in something, it triggers a change of state in the application. It might not be your case but is indeed my case.

All in all thanks for the update, this is such an awesome component. Keep up the great work!

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

@rayax86 No problem!

I'm still struggling to understand the use case :)

from filepond.

LordRampantHump avatar LordRampantHump commented on May 22, 2024

i would like to be able to change the text from tap to undo to tap to continue or something

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

@LordRampantHump you can do so with the labelTapToUndo property
https://pqina.nl/filepond/docs/patterns/api/filepond-instance/#labels

from filepond.

nehadhiman6 avatar nehadhiman6 commented on May 22, 2024

Please provide this feature.. for disabling remove/undo button.. sometime i need that user can only see initial files but has no right to remove those files.. thanks

from filepond.

rikschennink avatar rikschennink commented on May 22, 2024

@nehadhiman6 allowRemove and allowRevert should cover that

from filepond.

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.