skyrowl
skyrowl
FFilament
Created by skyrowl on 6/5/2024 in #❓┊help
Use requiresConfirmation on modal form
my mistake, arguments var must be named $arguments in the second action, thx a lot @Leandro Ferreira 😄
8 replies
FFilament
Created by skyrowl on 6/5/2024 in #❓┊help
Use requiresConfirmation on modal form
looks like that's what I'm looking for and chaining is working, tho I just don't know why but it won't pass arguments down to the second action
protected function headerActions(): array
{
return [
MassDeleteAction::make('mass_delete')
->label('Suppression en masse')
->modalHeading('Suppression en masse')
->action(fn (array $data) => $this->replaceMountedAction('fire', $data)),
];
}

public function fireAction(): Action
{
return Action::make('fire')
->requiresConfirmation()
->action(function (array $data) {
dd($data); // Returns []
});
}
protected function headerActions(): array
{
return [
MassDeleteAction::make('mass_delete')
->label('Suppression en masse')
->modalHeading('Suppression en masse')
->action(fn (array $data) => $this->replaceMountedAction('fire', $data)),
];
}

public function fireAction(): Action
{
return Action::make('fire')
->requiresConfirmation()
->action(function (array $data) {
dd($data); // Returns []
});
}
8 replies
FFilament
Created by skyrowl on 6/5/2024 in #❓┊help
Use requiresConfirmation on modal form
sure
class MassDeleteAction extends Action
{
protected function setUp(): void
{
parent::setUp();

$this->model(
fn (FullCalendarWidget $livewire) => $livewire->getModel()
);

$this->requiresConfirmation();

$this->form(
fn (FullCalendarWidget $livewire) => [
Forms\Components\Grid::make(6)
->schema([
Forms\Components\DatePicker::make('from')
->displayFormat('D j M Y')
->columnSpan(3)
->native(false)
->required()
->reactive()
->label('Du (inclus)'),
Forms\Components\DatePicker::make('to')
->displayFormat('D j M Y')
->native(false)
->minDate(function (Get $get) {
return $get('from');
})
->columnSpan(3)
->required()
->label('Au (inclus)'),
]),
]
);

$this->after(
fn (FullCalendarWidget $livewire) => $livewire->refreshRecords()
);

$this->cancelParentActions();
}
}
class MassDeleteAction extends Action
{
protected function setUp(): void
{
parent::setUp();

$this->model(
fn (FullCalendarWidget $livewire) => $livewire->getModel()
);

$this->requiresConfirmation();

$this->form(
fn (FullCalendarWidget $livewire) => [
Forms\Components\Grid::make(6)
->schema([
Forms\Components\DatePicker::make('from')
->displayFormat('D j M Y')
->columnSpan(3)
->native(false)
->required()
->reactive()
->label('Du (inclus)'),
Forms\Components\DatePicker::make('to')
->displayFormat('D j M Y')
->native(false)
->minDate(function (Get $get) {
return $get('from');
})
->columnSpan(3)
->required()
->label('Au (inclus)'),
]),
]
);

$this->after(
fn (FullCalendarWidget $livewire) => $livewire->refreshRecords()
);

$this->cancelParentActions();
}
}
8 replies
FFilament
Created by skyrowl on 11/14/2023 in #❓┊help
Mutate data on relation manager
4 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
I understand, thx for the time you took for me I might post an issue on async alpine instead as it's not related to filament nor your plugin
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
https://www.mozilla.org/fr/firefox/developer/ It's not well known but I'm using it to separate private usage navigation vs work related navigation
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
I had the issue in base firefox too even if it's not on every load compared to dev edition Tho dev edition is not a nightly it's just firefox with additional tools
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
I'm sorry I don't understand well I think I'm missing something On my computer I edited vendor files to change ax-load="visible" to ax-load="eager" and the script was only loaded in network tab when the modal opens
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
I tested eager and it was only loaded the moment the modal was shown, is it different on chromium browsers ?
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
I don't really have a screen recorder on my comp I'm sorry 😓 Btw I forgot but wanted to ask, is there a reason you choosed visible over eager on async alpine for that component ?
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
No description
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
was meaning to limitate boundaries so that it can't overflow also I can't input in X or Y without having a weird behaviour, it changes my input to random numbers within the container, like having Y = -36, I delete 6 and it change to -70 ... 😅
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
Do you think we could implement a button in curation to reset cropper container to the image size without any x overflow ?
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
No description
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
Oh we don't have the same thing then cause I only have the BG when zooming out and the container is the size of the image, maybe cause I'm on mobile don't know ?
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
Not sure it's about cropper itself but more how it has been integrated Looking at their demo the cropping can't leave the image https://fengyuanchen.github.io/cropperjs/
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
also not related at all but is it normal that cropper can go outside the image and generates black bands ?
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
I tested on firefox it works tho it does not on firefox dev edition, I'm pretty sure the problem comes from interpretation of IntersectionObserver between the two browsers
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
oh ... wait
81 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
@awcodes by changing ax-load from visible to eager it does load the script correctly, I think the problem comes from IntersectionObserver depending on the browser Can you test it again with firefox ?
81 replies