Adding ->url() to a column when using grid, adds extra blank column
Package
filament/filament
Package Version
v3.0.0
Laravel Version
v11
Livewire Version
v3
PHP Version
8.3
Problem description
If you have a Grid, and inside that there is a column with a url('somehting'), an extra column is added before the url column. It is blank, and causes the remaining columns to be bunched.
In testing, it is also dependent on there being an edit route in getPages().
It is the same issue as mentioned here: https://github.com/filamentphp/filament/discussions/9361
Expected behavior
no additional columns to be added when using ->url()
Steps to reproduce
in the repo, either comment out the ->url() line, or the edit route in getPages()
Reproduction repository (issue will be closed if this is not valid)
https://github.com/andy-UKC/filament-url-grid-bug
Relevant log output
No response
Same as https://github.com/filamentphp/filament/issues/9878. I commented the problem there
Filament wraps the entire record in a <a> when the "Record URL" feature is being used. The browser breaks when you then put another link inside the record, since it doesn't allow nested <a> tags.
To fix this, you can use $table->recordUrl(null) to remove the wrapping <a>.