Column URL - apply only to text, not the whole cell?

My users are a bit thrown off that in an otherwise clickable row, the whitespace in a URL column follows the URL, rather than the row-click behavior. In their defense, mousing over the text creates an underline as if only the text is the link. Perhaps if mousing over the whitespace also triggered the underline, the current behavior would be more intuitive. Can anybody suggest how to accomplish either? Thanks in advance.
Solution:
You could create a custom column extending the TextColumn and customizing what you need https://filamentphp.com/docs/3.x/tables/columns/custom...
Jump to solution
4 Replies
LeandroFerreira
you could use a tooltip to show that it follows the url..
lukevi
lukevi4w ago
good suggestion, thanks! That will show on hover anywhere in the cell & help make the expected click behavior fit what will happen. it's a little tempting to fiddle with the column component - it looks like I could remove the $url from these checks and make the overall cell keep the row's behavior.
#/vendor/filament/tables/resources/views/components/columns/column.blade.php
@if (($url || ($recordUrl && $action === null)) && (! $isClickDisabled))
<a
{{ \Filament\Support\generate_href_html($url ?: $recordUrl, $shouldOpenUrlInNewTab) }}
class="{{ $columnClasses }}"
>
{{ $slot }}
</a>
#/vendor/filament/tables/resources/views/components/columns/column.blade.php
@if (($url || ($recordUrl && $action === null)) && (! $isClickDisabled))
<a
{{ \Filament\Support\generate_href_html($url ?: $recordUrl, $shouldOpenUrlInNewTab) }}
class="{{ $columnClasses }}"
>
{{ $slot }}
</a>
then i'd have to go into the specific types like text-column.blade.php and put an <a> around maybe {{ $placeholder }}..
Solution
LeandroFerreira
You could create a custom column extending the TextColumn and customizing what you need https://filamentphp.com/docs/3.x/tables/columns/custom
lukevi
lukevi4w ago
Amazing- Filament has still not stopped impressing me with its flexibility. Thank you for another very helpful answer.
Want results from more Discord servers?
Add your server
More Posts
RichEditor content inside a repeater can't be viewed in update pageHi, in prod, i don't understand, why the content of RichEditor field, inside a repeater, can't be viWhat is the best/easiest way to overwrite a resource within a package?I'm using the following 2 packages and would like to edit both resources: ``` "z3d0x/filameExporter - include relationships as extra rowsUsing the Exporter for a table - am trying to inject additional rows for relationships that exist. THow can I display a file uploaded using the spatie media library on the info list pageHey all!, in my filament project I'm making use of of the spatie media library for filament (https:/How i can disable submit button until form is fully validated filament```Forms\Components\Select::make('from_id')->relationship(name: 'from', modifyQueryUsing: fn (BuildeCan not add table to a componentI have a custom component where i want to display a table. Implemented the trait and interface: `How i can display the error message before submit``` Forms\Components\Select::make('from_id') ->relationship(name: 'from', I used a checkbox in the filter and it has default true.Hi everyone, I used a checkbox in the filter and it has default true. but I want to disable or hideChanging language in ListItem does not translate the related records.I have a translatable resource with EditResource page. I have some relations to this resource, also My cutom theme was not woking in Production modeHello, I have create filament app. and i have use custom theme in that. but got error in production