Closed parmentelat closed 3 years ago
There is onactivatefile
callback you could use, you can then open a modal or show edit fields somewhere else to modify file data.
all righty
however the doc only seems to mention a file
parameter
is there a way that I can access the event object then ? I'd need the event's target so I can implement something a little less intrusive than a modal, and/or several sensitive areas inside the blob, or...
It receives the fileItem that was clicked, this item has an id which you can use to interact with FilePond itself. Maybe I misunderstand what you plan to do.
so first off, the solution you gave me so far is way better than anything I had tried before so BIG THANKS already :)
what I meant was: the 'activatefile' callback being called is the result of me clicking in the item area, right ? so I'd love to access that click event - as a parameter to the callback - this way I can for example see in which part of the item the click occurred, that sort of stuff
Hey, that info is currently not available in the onactivatefile
callback.
I'd consider creating a custom plugin, that will give you a lot more flexibility. Forking the file-poster plugin might be a good start.
Closed because inactive.
Hiya; thank you for this awesome tool :)
Is your feature request related to a problem? Please describe.
my app is about uploading files on the backend, and then having the ability to do stuff with these files from there (namely, deploy the files to people who have subscribed it)
so in essence I need to somehow create some sort of reactive area inside the file widget, that allows the app user to trigger these extra tasks
Describe the solution you'd like
I can live with something a little patchy at first (see below)
not quite sure how this could be proposed nicely
Describe alternatives you've considered
So far I have tried to use the
.filepond--file-info-sub
span area to inject my stuff my initial attempt was to insert in there something like a<span onclick="my_stuff(...)">
howevermy_stuff()
won't trigger, and I'm at a loss to figure how to make it aliveI understand that this is sort-of conflicting with
allowReorder
so I did set it tofalse
(knowing that the extra button is much more important to me than the ability to manually reorder things) but that still won't workAt the very least I could use some description of how the events are handled incidentally I tried to reverse-engineer this mechanism by enabling debugging on the 'click' event but could not guess how all this is supposed to work...
Additional context
I did search on stackoverflow but came up with nothing relevant
I also tried
opacity: 1
on the one item which was 0.5, because of some code infilepond.js
that suggested it might matterz-index : 100
on the element just in casebut no avail either
in my current code the small horizontal arrow is meant to become the button (once styled a little more properly of course)
thanks for any tip / thought