ImShehryar
ImShehryar
FFilament
Created by ImShehryar on 7/22/2024 in #❓┊help
Multi-select select all/deselect all
Sorry, this works:
->action(fn (Select $component) => $component>state(array_keys($component->getOptions())))
->action(fn (Select $component) => $component>state(array_keys($component->getOptions())))
7 replies
FFilament
Created by ImShehryar on 7/22/2024 in #❓┊help
Multi-select select all/deselect all
Neither of these working when click on 'select all'
->action(fn (Select $component) => $component->getOptions())

->action(fn (Select $component) => array_keys($component>getOptions()))

->action(fn (Select $component) => array_values($component->getOptions()))
->action(fn (Select $component) => $component->getOptions())

->action(fn (Select $component) => array_keys($component>getOptions()))

->action(fn (Select $component) => array_values($component->getOptions()))
7 replies
FFilament
Created by ImShehryar on 9/17/2023 in #❓┊help
Make default select option other than the disabled option
Thanks currently on mobile i will share later, is there any function to get the disabled options only: $component->getOptions() which gets all options, $component->getDisabledOptions() which can get the disabled options only
8 replies
FFilament
Created by ImShehryar on 9/17/2023 in #❓┊help
Make default select option other than the disabled option
Thanks, but how to find the first option that is not disabled inside the options array and make it default.. As the options inside array are randomly disabled. for example:
->default(array_key_first($this->options->except('option which is disabled')) // like this or using collection to filter out options except the ones that are disabled
->default(array_key_first($this->options->except('option which is disabled')) // like this or using collection to filter out options except the ones that are disabled
8 replies
FFilament
Created by ImShehryar on 8/22/2023 in #❓┊help
InfoList Tabs Query
thanks sir....its ->state()
Tabs::make('Resolutions Details')
->tabs([
Tabs\Tab::make('Passed')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
])
->state(function (Model $record) {
return $record->resolutions->where('resolution_passed', true);
}),
]),
Tabs\Tab::make('Rejected')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
])
->state(function (Model $record) {
return $record->resolutions->where('resolution_passed', false);
}),
]),
])
Tabs::make('Resolutions Details')
->tabs([
Tabs\Tab::make('Passed')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
])
->state(function (Model $record) {
return $record->resolutions->where('resolution_passed', true);
}),
]),
Tabs\Tab::make('Rejected')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
])
->state(function (Model $record) {
return $record->resolutions->where('resolution_passed', false);
}),
]),
])
11 replies
FFilament
Created by ImShehryar on 8/22/2023 in #❓┊help
InfoList Tabs Query
I am using the above code inside Resource page infoList:
public static function infolist(Infolist $infolist): Infolist
{
return return $infolist
->schema([
// .....
])
}
public static function infolist(Infolist $infolist): Infolist
{
return return $infolist
->schema([
// .....
])
}
11 replies
FFilament
Created by ImShehryar on 8/22/2023 in #❓┊help
InfoList Tabs Query
Yes sir i m using RepeatableEntry inside each tab:
Section::make('Resolutions details')
->schema([
Tabs::make('Resolutions Details')
->tabs([
// how to query like this: $query->where('resolution_passed', true) and show filtered data in 'Passed' Tab
Tabs\Tab::make('Passed')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
]),
]),
// how to query like this: $query->where('resolution_passed', false) and show filtered in 'Rejected' Tab
Tabs\Tab::make('Rejected')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
]),
]),
])
])
->compact()
->collapsible()
Section::make('Resolutions details')
->schema([
Tabs::make('Resolutions Details')
->tabs([
// how to query like this: $query->where('resolution_passed', true) and show filtered data in 'Passed' Tab
Tabs\Tab::make('Passed')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
]),
]),
// how to query like this: $query->where('resolution_passed', false) and show filtered in 'Rejected' Tab
Tabs\Tab::make('Rejected')
->schema([
RepeatableEntry::make('resolutions')
->hiddenLabel()
->schema([
TextEntry::make('resolution_no'),
]),
]),
])
])
->compact()
->collapsible()
11 replies
FFilament
Created by ImShehryar on 8/22/2023 in #❓┊help
InfoList Tabs Query
Sure sir.. I am using InfoList Tabs inside my Resource and want to filter the query to show filtered results in separate tabs e.g. one tab showing "Passed" and other tab showing "Rejected" results based on where condition.
11 replies
FFilament
Created by Mellor on 8/3/2023 in #❓┊help
Using `icons` with IconColumn
Not works with me also: Tables\Columns\IconColumn::make('email_verified_at') ->label('Email Verified') ->icon(fn($state) => $state ? 'heroicon-o-check-circle' : 'heroicon-o-x-circle') ->sortable(),
9 replies
FFilament
Created by ImShehryar on 5/28/2023 in #❓┊help
CSV file Validation
Yes works..BTW i also use acceptedFileTypes...seems not working..anyhow..Let the livewire handle it...thank u
5 replies
FFilament
Created by ImShehryar on 5/28/2023 in #❓┊help
CSV file Validation
What about using ->acceptedFileTypes([]) to force the browser to show only csv files when browsed ?
5 replies
FFilament
Created by ImShehryar on 5/24/2023 in #❓┊help
How to emit event from create action to update the widget stats
Thank u...Tried this and works ->after (function ($livewire){ $livewire->emit('refresh'); })
6 replies
FFilament
Created by ImShehryar on 5/20/2023 in #❓┊help
How to Update widget on Table Filters "Reset Filters", and Active Filters both X icons
And also want to reset the stats widget according to default selected filter value
9 replies
FFilament
Created by ImShehryar on 5/20/2023 in #❓┊help
How to Update widget on Table Filters "Reset Filters", and Active Filters both X icons
9 replies
FFilament
Created by ImShehryar on 5/20/2023 in #❓┊help
How to Update widget on Table Filters "Reset Filters", and Active Filters both X icons
Will try and let u know..Thanks for the awesome support and awesome package..
9 replies
FFilament
Created by ImShehryar on 5/20/2023 in #❓┊help
How to Update widget on Table Filters "Reset Filters", and Active Filters both X icons
9 replies
FFilament
Created by ImShehryar on 5/17/2023 in #❓┊help
Show an alert above the table conditionally
Haven't tried yet..but will try..if didnt found a solution..
6 replies