filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.65k stars 2.76k forks source link

adding URL to column breaks split layout #9878

Closed jdion84 closed 9 months ago

jdion84 commented 9 months ago

Package

filament/filament

Package Version

3

Laravel Version

10

Livewire Version

3

PHP Version

8

Problem description

when adding a ->url() to a text column, it messes up a split table layout completely

before adding ->url():

after adding ->url():

here is an example of the code i am using for this table:

        return $table
            ->columns([
                Split::make([
                    TextColumn::make('name')
                        ->searchable()
                        ->sortable(),

                    Stack::make([
                        TextColumn::make('email')
                            ->url(function ($state) {
                                return "mailto:$state";
                            })
                            ->searchable()
                            ->sortable(),

                        TextColumn::make('phone')
                            ->searchable()
                            ->sortable(),
                    ]),

                    TextColumn::make('type')
                        ->sortable(),
                ]),
            ])->from('md')

i prefer using the Split for all tables because its amazing on mobile.

it appears this may be caused by the w-full class applied to URL's inside table columns.

Expected behavior

i expect it to look exactly the same, just make the email address clickable

Steps to reproduce

see description

Reproduction repository

n/a

Relevant log output

No response

github-actions[bot] commented 9 months ago

Hey @jdion84! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

Also, it doesn't look like you've provided much information on how to replicate the issue. Please edit your original post with clear steps we need to take.

bendbot commented 6 months ago

Why didn’t they want to fix this minor but unpleasant problem? There's only one w-full css class that gets in the way.

https://github.com/filamentphp/filament/blob/1ea20b0c5c6be32957c05bc8de4c303bdc0918a7/packages/tables/resources/views/index.blade.php#L550

sezohessen commented 1 month ago

same issue

sezohessen commented 1 month ago

You can add specific style for this resource page to be :

  <style>
        .fi-ta-split .w-full{
            width: auto!important;
        }
    </style>