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
19.39k stars 2.97k forks source link

Fix table empty view with no records #14675

Closed mishkx closed 2 weeks ago

mishkx commented 3 weeks ago

Description

Table additional headers was not displayed with no records.

Visual changes

Before image

After image

Functional changes

danharrin commented 2 weeks ago

Hmm I don't know about this, I'm pretty sure there are reasons why we don't render the table when there are no records. Probably column widths jumping after content is added?

Also, how does this affect the table layout feature, when there is no <table> element?

danharrin commented 2 weeks ago

I think I remember why this is: the empty state scrolls when you have enough columns that make the table overflow horizontally?

zepfietje commented 2 weeks ago

I think I remember why this is: the empty state scrolls when you have enough columns that make the table overflow horizontally?

Yup that's the reason, @danharrin.

I do think the table column headers need to be displayed conditionally in order to undo applied filters or searches.

danharrin commented 2 weeks ago

The applied filters and searches can be undone from the filter indicators I think

zepfietje commented 2 weeks ago

Yeah but that UX is bad when entering a search query in the single field search input. When it returns no results, the input disappears, so you can just hit backspace and update your search query.

danharrin commented 2 weeks ago

Yeah so this isn't really mergeable in its current state due to the overflow scroll issue... think we should tackle this in v4 to minimise the potential of breaking changes 👍 Thanks @mishkx