Skip to content

Added Htmlable Support For TableHeader.#4307

Merged
danharrin merged 7 commits into
filamentphp:2.xfrom
Nuhel:Enhancement-Added-Htmlable-Support-For-TableHeader-
Oct 7, 2022
Merged

Added Htmlable Support For TableHeader.#4307
danharrin merged 7 commits into
filamentphp:2.xfrom
Nuhel:Enhancement-Added-Htmlable-Support-For-TableHeader-

Conversation

@Nuhel
Copy link
Copy Markdown
Contributor

@Nuhel Nuhel commented Oct 1, 2022

Always making view, and pass it as table header is not something we want all time as we can use htmlstring in filament.

So I add support for this.

Also i see there may be issue with table headeraction, So what i have done , If the table header pass as argument is Illuminate\Support\HtmlString, I just added the action with the heading.

Here is an demo what it look like.
Screenshot 2022-10-01 at 11 19 16 AM

Screenshot 2022-10-01 at 11 31 38 AM

Always making view, and pass it as table header is not something we want all time as we can use htmlstring in filament.

So I add support for this.

Also i see there may be issue with table headeraction, So what i have done , If the table header pass as argument is Illuminate\Support\HtmlString, I just added the action with the heading.
@danharrin
Copy link
Copy Markdown
Member

Your IDE has made hundreds of formatting changes, please revert them

@zepfietje zepfietje added the enhancement New feature or request label Oct 1, 2022
@Nuhel
Copy link
Copy Markdown
Contributor Author

Nuhel commented Oct 1, 2022

Your IDE has made hundreds of formatting changes, please revert them

Yes, Sorry for that.
Have a look now :)

Comment thread packages/tables/resources/views/index.blade.php Outdated
@danharrin
Copy link
Copy Markdown
Member

We should actually support Htmlable in the getTableHeading(), not getTableHeader(). You want to keep the action buttons, but thats not the behaviour of getTableHeading().

@danharrin
Copy link
Copy Markdown
Member

done

@danharrin danharrin merged commit c14c32c into filamentphp:2.x Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants