Hugo
Hugo
FFilament
Created by Mateus on 9/16/2024 in #❓┊help
Action that opens a modal, where there are buttons that take you to other modals
right after posting this, I went and analyzed all the methods on the HasTable interface and replaced the
$livewire->mountTableAction()
$livewire->mountTableAction()
with
$livewire->replaceMountedTableAction('create_sizes', (string)$record->id);
$livewire->replaceMountedTableAction('create_sizes', (string)$record->id);
and it is working.
6 replies
FFilament
Created by Mateus on 9/16/2024 in #❓┊help
Action that opens a modal, where there are buttons that take you to other modals
I have the same question, is it possible to open a modal right after submiting the action? I tried
->action(function ($data, $arguments,$livewire, $action) {
if($arguments['withoutSizes'] ?? false){
$record = CreateArticleTypeAction::fromArray($data);
$livewire->dispatch('open-modal', 'create_sizes');
$livewire->mountTableAction('create_sizes', (string)$record->id);
}
})
->action(function ($data, $arguments,$livewire, $action) {
if($arguments['withoutSizes'] ?? false){
$record = CreateArticleTypeAction::fromArray($data);
$livewire->dispatch('open-modal', 'create_sizes');
$livewire->mountTableAction('create_sizes', (string)$record->id);
}
})
and it is not opening the modal, it just shows a gray overlay (like it is opening the modal) but the modal does not open, any suggestions if this is possible to do?
6 replies
FFilament
Created by on 10/15/2024 in #❓┊help
Expandable Rows
No, I wasn't using any filters. I don't know how it would interact either.
6 replies
FFilament
Created by on 10/15/2024 in #❓┊help
Expandable Rows
No description
6 replies
FFilament
Created by on 10/15/2024 in #❓┊help
Expandable Rows
You can use Split, the downside of using this approach is the fact you lose the table headers. You can go from this example:
public static function getTableColumns($articleTypeWithSize = null):array
{
return [
Split::make([
TextColumn::make(name: 'identifier')
->label(label: __(key: 'crud.clients.inputs.identifier'))
->searchable()
->alignCenter()
->tooltip(tooltip: __(key: 'crud.clients.inputs.identifier'))
->sortable()
]),
View::make('tables.article-types-collapsible-row-content')
->components(components: function ($record) use($articleTypeWithSize): array {
if ($record !== null) {
$children = $record->assignedArticleTypesWithSizes()->where('article_type_id', $articleTypeWithSize->article_type_id)->where('is_unique_size',false)->get();
$components = [];
foreach ($children as $child) {
$components[] = Panel::make(schema: [
TextColumn::make('name')
->label('name')
->tooltip(tooltip: 'name')
->getStateUsing(callback: fn() => $child->articleType->name)
->alignCenter()
->toggleable(),
])->extraAttributes(attributes: ['class' => 'flex']);
}
return $components;
}
return [];
})
->collapsible()
];
}
public static function getTableColumns($articleTypeWithSize = null):array
{
return [
Split::make([
TextColumn::make(name: 'identifier')
->label(label: __(key: 'crud.clients.inputs.identifier'))
->searchable()
->alignCenter()
->tooltip(tooltip: __(key: 'crud.clients.inputs.identifier'))
->sortable()
]),
View::make('tables.article-types-collapsible-row-content')
->components(components: function ($record) use($articleTypeWithSize): array {
if ($record !== null) {
$children = $record->assignedArticleTypesWithSizes()->where('article_type_id', $articleTypeWithSize->article_type_id)->where('is_unique_size',false)->get();
$components = [];
foreach ($children as $child) {
$components[] = Panel::make(schema: [
TextColumn::make('name')
->label('name')
->tooltip(tooltip: 'name')
->getStateUsing(callback: fn() => $child->articleType->name)
->alignCenter()
->toggleable(),
])->extraAttributes(attributes: ['class' => 'flex']);
}
return $components;
}
return [];
})
->collapsible()
];
}
6 replies
FFilament
Created by Richard Bowen on 10/10/2024 in #❓┊help
CSS not working after fresh install of filament
same issue here, I've updated to the latest version and my css got all messed up, also reverted back to 3.2.115 for now.
25 replies
FFilament
Created by TheRealTeeHill on 5/30/2024 in #❓┊help
Long email address in tooltip breaking at the @
Hi, is this solution still working? I'm at the moment trying to use it to list data in a tooltip and it isn't showing any tooltip.
14 replies
FFilament
Created by Hugo on 6/6/2024 in #❓┊help
Import / Export Session expired & logout - Export with random table info.
Any updates?
4 replies
FFilament
Created by Hugo on 6/6/2024 in #❓┊help
Import / Export Session expired & logout - Export with random table info.
I've tested it on a table with 18 records and 4/5 times it logs me out. The loading animation takes a little longer and then it just logs me out. The one time it worked fine.
4 replies
FFilament
Created by christmex on 3/14/2024 in #❓┊help
Import and Export bug, keep showing 419 expired
This saved me the problem of constantly showing me that the page has expired but it still logs me out of the app. Any way to solve this?
8 replies
FFilament
Created by Hugo on 5/11/2024 in #❓┊help
Dynamic columns on Importer class
Sorry for the very delayed answer. I ended up making my own classes, adapting some of filament's in order to access the options array wherever I want.
10 replies
FFilament
Created by Hugo on 5/11/2024 in #❓┊help
Dynamic columns on Importer class
ok, thank you. I'll do my best to make it work somehow.
10 replies
FFilament
Created by Hugo on 5/11/2024 in #❓┊help
Dynamic columns on Importer class
Will it help me create the dynamic ImportColumns and show them on the modal that pops up upon importing a file?
10 replies
FFilament
Created by Sydd on 4/19/2024 in #❓┊help
canView widget
what I got from testing is that canView() is the first thing to be checked as soon as the page tries to show the widget. I've tried to dd on the render and even on the mount and they are only called after the canView() method. This is my thought process, idk if its really like that but it would never go inside the render or mount method before the canView().
17 replies
FFilament
Created by Sydd on 4/19/2024 in #❓┊help
canView widget
it says its not an object therefore can't use $this
17 replies
FFilament
Created by Sydd on 4/19/2024 in #❓┊help
canView widget
Hey, it might have nothign related to this but, is there a way I can hide the widget if it has no data? It just shows a blank rectangle when there is no data to show on the chart widget. I tried to do this with canView method and it works when im not doing a query to a specific $record but when my chart has a record, I can't access the $this->record inside the canView method since it says it's not an object. Is there a way to just hide the widget when there's no data to show?
17 replies
FFilament
Created by Hugo on 4/12/2024 in #❓┊help
Send variables to the Exporter
Thank you, it worked. Since there was no info on the Export Action docs, I thought it wasn't possible.
8 replies
FFilament
Created by Hugo on 4/12/2024 in #❓┊help
Send variables to the Exporter
Couldn't find it. Could you link me the docs? Sorry for the delayed response.
8 replies
FFilament
Created by Hugo on 4/12/2024 in #❓┊help
Send variables to the Exporter
Can i access it inside the Exporter tho?
8 replies
FFilament
Created by Hugo on 4/3/2024 in #❓┊help
sticky table header
what im missing at the moment is the horizontal scroll on the table with the sticky header as it is with that css i've provided. Im not specialist in CSS, so if anyone has a good suggestion to how I can achieve that behavior i'd be glad. Thank you.
6 replies