Mook
Bulk actions which is only visible when 2 rows are selected
I'm trying to make a bulk action appear only when 2 table rows are selected. I'm using the visible function to try and achieve this:
->visible(fn ($livewire) => $livewire->selectedTableRecords == 2)
But this livewire array always seems to be empty no matter how many rows are selected?
I'm stuck, please help.12 replies
Searchable Select Field - display 2 values in options
Is it possible to have a select field which shows two data items in the options list.
For context I have a table of people and when someone searches I want the dropdown format to be: <Person name> (DOB) but I can't seem to figure this out.
I can render the human name just fine which is what they search for but can't add on the (DOB) bit.
3 replies
Populate repeater
I have a repeater which creates a DB entry on a related table. But I can't get the repeater to pull back the related table data? Part of this relationship uses a HasManyThrough.
I getr this error: Filament\Forms\Components\Repeater::getRelationship(): Return value must be of type Illuminate\Database\Eloquent\Relations\HasOneOrMany|Illuminate\Database\Eloquent\Relations\BelongsToMany|null, Illuminate\Database\Eloquent\Relations\HasManyThrough returned
Am I getting into the realms of fighting the framework instead of working with it?
2 replies
Stats widgets in rows of 4 columns
I have a view page which has stats widgets on. I want to display them in rows of 4. So I've set the below in my view page.
public function getHeaderWidgetsColumns(): int | array
{
return 4;
}
After this in the same class I call all the widgets using:
protected function getHeaderWidgets(): array
{
return [
//my widgets
]
}
But no matter what I do it won't display anything other than a row of 3 widgets.
Am I missing something here?4 replies