Umar Farooq
Umar Farooq
FFilament
Created by Umar Farooq on 7/29/2024 in #❓┊help
Add a loader when the pagination changes inside the table
find a workaround
<x-filament-panels::page>
<div wire:loading.class="opacity-50"
wire:target="tableFilters,applyTableFilters,resetTableFiltersForm, nextPage, gotoPage, previousPage, tableRecordsPerPage"
class="relative">
{{ $this->table }}

<div
wire:loading
wire:target="tableFilters,applyTableFilters,resetTableFiltersForm, nextPage, gotoPage, previousPage, tableRecordsPerPage"
class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" style="left: 50%;">
<x-filament::loading-indicator class="h-10 w-10 text-primary-500"/>
</div>
</div>
</x-filament-panels::page>
<x-filament-panels::page>
<div wire:loading.class="opacity-50"
wire:target="tableFilters,applyTableFilters,resetTableFiltersForm, nextPage, gotoPage, previousPage, tableRecordsPerPage"
class="relative">
{{ $this->table }}

<div
wire:loading
wire:target="tableFilters,applyTableFilters,resetTableFiltersForm, nextPage, gotoPage, previousPage, tableRecordsPerPage"
class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" style="left: 50%;">
<x-filament::loading-indicator class="h-10 w-10 text-primary-500"/>
</div>
</div>
</x-filament-panels::page>
5 replies
FFilament
Created by taz on 7/30/2024 in #❓┊help
FIlament Blade components outside filament. Change default primary color
inside the service provider you can change the color
->colors([
'primary' => Color::Amber,
])
->colors([
'primary' => Color::Amber,
])
9 replies
FFilament
Created by Umar Farooq on 7/29/2024 in #❓┊help
Add a loader when the pagination changes inside the table
@Dan Harrin
5 replies
FFilament
Created by Umar Farooq on 7/22/2024 in #❓┊help
Select component Allow Multiple select
@Dennis Koch
5 replies
FFilament
Created by Daniele on 7/23/2024 in #❓┊help
Multiple columns from the same relationship in an ExportAction
maybe use
ExportColumn::make('id')
->exists(['posts' => fn (Builder $query) => $query->where('type', 'image')])
->label('Has images')
ExportColumn::make('id')
->exists(['posts' => fn (Builder $query) => $query->where('type', 'image')])
->label('Has images')
6 replies
FFilament
Created by Umar Farooq on 7/22/2024 in #❓┊help
Select component Allow Multiple select
I want to clear the search input and submit the form
->getSearchResultsUsing(static function (
?string $search,
Forms\Components\Select $component,
Forms\Get $get,
) use($supplierId) {
$attribute = $get('attribute');

if ($attribute) {
if (!str_contains($search, ',')) {
return static::filterSearchValues($get, $supplierId, search: $search);
}

$searchArray = array_map('trim', explode(',', $search));

$filters = static::filterSearchValues(
$get,
$supplierId,
array_filter($searchArray, function($value) { return $value !== ''; })
);

$component->state([
...array_keys($filters->toArray()),
...$component->getState(),
]);

return $filters;
}

return [];
})
->getSearchResultsUsing(static function (
?string $search,
Forms\Components\Select $component,
Forms\Get $get,
) use($supplierId) {
$attribute = $get('attribute');

if ($attribute) {
if (!str_contains($search, ',')) {
return static::filterSearchValues($get, $supplierId, search: $search);
}

$searchArray = array_map('trim', explode(',', $search));

$filters = static::filterSearchValues(
$get,
$supplierId,
array_filter($searchArray, function($value) { return $value !== ''; })
);

$component->state([
...array_keys($filters->toArray()),
...$component->getState(),
]);

return $filters;
}

return [];
})
5 replies
FFilament
Created by KA on 12/6/2023 in #❓┊help
->expandableLimitedList() seems not working as expected for InfoList
The expandableLimitedList also navigates the page instead of just expanding the list
23 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
where applications is the relation define in the user model
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
filament automatically handle
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
then use something like TextInputColumn::make('applications.screening_mark')
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
is there a relation with the users table?
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
in which table screening_mark column exists?
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
inside the EditResource class
protected function handleRecordUpdate(Model $record, array $data): Model
{
return parent::handleRecordUpdate($record, $data); // TODO: Change the autogenerated stub
}
protected function handleRecordUpdate(Model $record, array $data): Model
{
return parent::handleRecordUpdate($record, $data); // TODO: Change the autogenerated stub
}
17 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
no solution? 🥲
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
HasLocalPreference is not working
/**
* @return string|null
*/
public function preferredLocale(): ?string
{
return \App::getLocale();
}
/**
* @return string|null
*/
public function preferredLocale(): ?string
{
return \App::getLocale();
}
38 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
thanks
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
working
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
No description
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
nothing change
public function mount(
AppSettings $settings,
int $lineItem,
): void
{
$this->record = static::$model::find($lineItem);
$this->settings = $settings->toArray();

$data = [];

foreach ($this->record->postOrderRequests as $postOrderRequest) {
$request = $postOrderRequest->request;

if (!$request->workflow->terminated) {
if ($request->type === 'need_picture_request') {
$data['response-' . $postOrderRequest->id] = [
'image' => null,
'response' => null
];
} else {
$data['response-' . $postOrderRequest->id] = null;
}
}
}

$this->form->fill($data);
}
public function mount(
AppSettings $settings,
int $lineItem,
): void
{
$this->record = static::$model::find($lineItem);
$this->settings = $settings->toArray();

$data = [];

foreach ($this->record->postOrderRequests as $postOrderRequest) {
$request = $postOrderRequest->request;

if (!$request->workflow->terminated) {
if ($request->type === 'need_picture_request') {
$data['response-' . $postOrderRequest->id] = [
'image' => null,
'response' => null
];
} else {
$data['response-' . $postOrderRequest->id] = null;
}
}
}

$this->form->fill($data);
}
13 replies