Sesh
Sesh
FFilament
Created by Sesh on 8/9/2023 in #❓┊help
Select filter grouping options in relation filter
This is my current code that works for me: Filter::make('productCategories') ->form([ Select::make('productCategories') ->label(__('Product Categories')) ->multiple() ->preload() ->optionsLimit(150) ->options( $groupedProductCategories ), ]) ->query(function (Builder $query, array $data): Builder { return $query ->when( $data['productCategories'], fn (Builder $query, $productCategories): Builder => $query->whereHas( 'productCategories', function ($q) use ($productCategories) { $q->whereIn('product_categories.id', $productCategories); } ) ); })
9 replies
FFilament
Created by Sesh on 7/27/2023 in #❓┊help
How to change style of card when arranged to grid?
Ah no sorry it was in a standalone component, but I am sure there must be a way to injest custom css to a ressource page
11 replies
FFilament
Created by Sesh on 7/27/2023 in #❓┊help
How to change style of card when arranged to grid?
Just override it on the respective page in a <style></style> tag, thats what I did
11 replies
FFilament
Created by Sesh on 8/9/2023 in #❓┊help
Select filter grouping options in relation filter
Was anyone able to get Option Groups to work with a relationship in a SelectFilter? It seems that using ->relationship() overwrites the provided ->options() so it is not displayed in groups.
9 replies
FFilament
Created by Sesh on 8/2/2023 in #❓┊help
Arranging records into a grid does not work
8 replies
FFilament
Created by Sesh on 8/2/2023 in #❓┊help
Arranging records into a grid does not work
Yes you need Split or Stack, otherwise it will not arrange it as cards properly.
8 replies
FFilament
Created by Sesh on 8/11/2023 in #❓┊help
Customize / translate CreateAction modal title
Thanks @awcodes
9 replies
FFilament
Created by Sesh on 8/11/2023 in #❓┊help
Customize / translate CreateAction modal title
Aaah its: ->modalHeading(fn () => __('translation-key'))
9 replies
FFilament
Created by Sesh on 8/11/2023 in #❓┊help
Customize / translate CreateAction modal title
Thanks. I am getting this error: Method Filament\Tables\Actions\CreateAction::modalHeader does not exist.
9 replies
FFilament
Created by Sesh on 8/9/2023 in #❓┊help
Select filter grouping options in relation filter
The data is in this form (as described in the doc at https://filamentphp.com/docs/3.x/forms/fields/select#grouping-options):
Select::make('status')
->searchable()
->options([
'In Process' => [
'draft' => 'Draft',
'reviewing' => 'Reviewing',
],
'Reviewed' => [
'published' => 'Published',
'rejected' => 'Rejected',
],
])
Select::make('status')
->searchable()
->options([
'In Process' => [
'draft' => 'Draft',
'reviewing' => 'Reviewing',
],
'Reviewed' => [
'published' => 'Published',
'rejected' => 'Rejected',
],
])
If I use ->relationship() it takes the options from the relation and not from the grouped options.
9 replies
FFilament
Created by Sesh on 8/2/2023 in #❓┊help
Arranging records into a grid does not work
stack
8 replies
FFilament
Created by Sesh on 8/3/2023 in #❓┊help
How to use deep relations in filters in the V3 Table Builder?
Thats seems to be the way, thanks.
5 replies
FFilament
Created by Sesh on 8/2/2023 in #❓┊help
Active filter badges are repeating themselves
This was a bug in Filament which has been corrected in the newest version (3.0.6). Thanks @Dan Harrin for the bugfix.
4 replies
FFilament
Created by Sesh on 8/2/2023 in #❓┊help
How to "Should select current page only" in V3?
Worked, thanks. 🔥
5 replies
FFilament
Created by Sesh on 8/2/2023 in #❓┊help
Show table in grid
How could I not see this 😅 Thanks
7 replies
FFilament
Created by Sesh on 7/29/2023 in #❓┊help
How to disable select all in Table Builder?
This worked for me:
protected function shouldSelectCurrentPageOnly(): bool
{
return true;
}
protected function shouldSelectCurrentPageOnly(): bool
{
return true;
}
7 replies
FFilament
Created by Sesh on 7/29/2023 in #❓┊help
Certain font sizes (e.g. xs, xl) do not work in Table Builder
Update: I was able to achieve it with this: ->extraAttributes(['class' => 'text-xl font-bold'])
5 replies
FFilament
Created by Sesh on 7/27/2023 in #❓┊help
How to change style of card when arranged to grid?
Thanks @pboivin . Below is what I ended for white cards on a blank background and also all the gray background on the filter and sort elements removed. Maybe it helps someone. I will create a PR soon to add the classes which should make this easier.
.filament-tables-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-pagination-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-header-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-table-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-table-container>div.flex {
background: none !important;
border: none !important;
box-shadow: none !important;
}

/* Style for the card */
.filament-tables-table-container>div.grid>div>div {
background: white !important;
border-radius: 0.5rem !important;

}

.filament-tables-table-container>div.grid>div>div:hover {
background: #f9fafb !important;
}
.filament-tables-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-pagination-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-header-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-table-container {
background: none !important;
border: none !important;
box-shadow: none !important;
}

.filament-tables-table-container>div.flex {
background: none !important;
border: none !important;
box-shadow: none !important;
}

/* Style for the card */
.filament-tables-table-container>div.grid>div>div {
background: white !important;
border-radius: 0.5rem !important;

}

.filament-tables-table-container>div.grid>div>div:hover {
background: #f9fafb !important;
}
11 replies