Removing item from collection list, using Livewire #2957
Unanswered
alex-r-redfern
asked this question in
Q&A
Replies: 1 comment 1 reply
-
managed to solve the problem? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'm following the example here for a media collection which is working well, and I have implemented the custom list and item views.
However, I'm having issues on how to remove an item from the collection and have the displayed collection updated.
I have taken two approaches:
which is passed along to a listener in the component that is as follows:
This does indeed delete the media file, but the frontend shows no change until I perform a page refresh
wire:click="remove('{{ $mediaItem['uuid'] }}')
which pipes to the parentLivewireMediaLibraryComponent
'sremove
method, that dumps the media item from the$this->media
collection, but this doesn't persist.I'm sure I'm missing something obvious, but does anyone have any advice on this?
Thanks very much,
Alex
Beta Was this translation helpful? Give feedback.
All reactions