LowerRockLabs / LaravelLivewireTablesAdvancedFilters

Advanced filters for Rappasoft Laravel Livewire Tables
8 stars 0 forks source link

Demo tailwind 3 version, Smart select & changing per page rows to 50 throwin error #38

Closed BenOussama180 closed 1 year ago

BenOussama180 commented 1 year ago

when changed to 50 it throws error image

out of context question: is it normal that the dropdown filter is hidden when the filters are too long, we cant see the end of it , and how can i do the integrated filter inside table such as name in the demo

lrljoe commented 1 year ago

Error should be remediated now, it was due to a conflict with the package expecting the defaults to be setup, coupled with recursive parents, so the small demo box I've thrown together was running out of memory!

For inline filters, you just need to refer to the filter as a secondary header by it's key (typically this is the Str::slug of the name)

            Column::make('Name')
                ->sortable(function (Builder $query, string $direction) {
                    return $query->orderBy('name', $direction); // Example, ->sortable() would work too.
                })
                ->searchable()
                ->secondaryHeader($this->getFilterByKey('name'))
                ->footer($this->getFilterByKey('name')),

You can also hide it from the menus if you do that by calling hiddenFromMenus() against the filter in question:

            TextFilter::make('Email')
                ->hiddenFromMenus(),

Dropdown filter being hidden when it's too long - if you can give me a screenshot then I'll issue a fix.