[3.2.0] Export to CSV relationships
Hi there!
I'm trying out Filament 3.2, and it's amazing! However, when I try to use the dot notation to add a relationship in the export it just ignores it.
Am I missing something?
22 Replies
I am also facing same issue.
I have this problem as well, relationship columns with dot notation just gets ignored.
Same!
GitHub
Exporter can't export relationships data · Issue #10835 · filamentp...
Package filament/filament Package Version v3.2.2 Laravel Version v10.10 Livewire Version No response PHP Version v3.3.5 Problem description Exporter can't export relationships data, It will exp...
I'm experiencing the same issue
I have issues with timeout if datas more then 10000 row.
Not related with this issue. And raise one at github
got a few mins left at the office
cloning your repo now, maybe i can locate the issue
well at a quick glance
i think this line is the issue
g2g now but i wanna know this too will look again tomorrow
the relation is loaded when that line is called
goes wrong earlier, the mapping only contais the ID
in concerns/canExportRecords.php
this line is removing the relation, because the 'isEnabled' is a level deeper in the array
https://github.com/filamentphp/filament/issues/10835 i have updated the issue with my findings @Dan Harrin
GitHub
Exporter can't export relationships data · Issue #10835 · filamentp...
Package filament/filament Package Version v3.2.2 Laravel Version v10.10 Livewire Version No response PHP Version v3.3.5 Problem description Exporter can't export relationships data, It will exp...
Changed the mapping code and it works now for relations
i made a pull request, but that code of filament just goes over my head sometimes, too abstract for me too follow 😛
this code works if you have relation, but 1 level deeper and it breaks again i think ( order.customer.adresses.street for example)
@Patrick1989 changing line 126 to be
collect(Arr::dot($data['columnMap']))
should fix all issues, right?
actually
collect($data['columnMap'])->dot()
is prob betterye my fix is not good enough maarten is good
@Patrick1989 I didn't realize you were busy with this issue as well. My PR just got merged. It solves the issue: https://github.com/filamentphp/filament/pull/10899
GitHub
Fix exporting relationship values by maartenpaauw · Pull Request #1...
Description
Visual changes (if any) are shown using screenshots/recordings of before and after.
Code style
composer cs command has been run.
Testing
Changes have been tested.
Documenta...
nice work! thanks