Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.47k stars 215 forks source link

After text editing, Model is fixed with refresh but not Collection. #107

Closed tangjh closed 2 years ago

tangjh commented 2 years ago

When using Collection, edited text revert back to old Collection data after doing filtering.

1) Edit a text eg. name column 2) Edited text is reflected 3) Select a filter which does not consist of the edited row 4) Select filter which consist of the edited row. Text is reverted back to the original text. Checked the Collection and the Collection is updated.

Cache issue?

I'm using the development main branch. Testing the same steps with Model does not have problem. Text is updated correctly.

luanfreitasdev commented 2 years ago

If you are going to use the update on the component, I advise using the datatables as Model.

But if you still want to use it to update, you can remove the cache (it is only used in collection)

livewire-powergrid.php:

Update to false

image

tangjh commented 2 years ago

Got it. Thanks.