tomb8091
tomb8091
FFilament
Created by tomb8091 on 8/30/2024 in #❓┊help
Wizard issue with missing $statePath
$this->registerListeners([
'wizard::nextStep' => [
function (Wizard $component, null|string $statePath, int $currentStepIndex): void {

//Tom added this return, temporary fix
return;


if ($statePath !== $component->getStatePath()) {
return;
}

if (! $component->isSkippable()) {
/** @var Step $currentStep */
$currentStep = array_values(
$component
->getChildComponentContainer()
->getComponents()
)[$currentStepIndex];

try {
$currentStep->callBeforeValidation();
$currentStep->getChildComponentContainer()->validate();
$currentStep->callAfterValidation();
} catch (Halt $exception) {
return;
}
}

/** @var LivewireComponent $livewire */
$livewire = $component->getLivewire();
$livewire->dispatch('next-wizard-step', statePath: $statePath);
$this->registerListeners([
'wizard::nextStep' => [
function (Wizard $component, null|string $statePath, int $currentStepIndex): void {

//Tom added this return, temporary fix
return;


if ($statePath !== $component->getStatePath()) {
return;
}

if (! $component->isSkippable()) {
/** @var Step $currentStep */
$currentStep = array_values(
$component
->getChildComponentContainer()
->getComponents()
)[$currentStepIndex];

try {
$currentStep->callBeforeValidation();
$currentStep->getChildComponentContainer()->validate();
$currentStep->callAfterValidation();
} catch (Halt $exception) {
return;
}
}

/** @var LivewireComponent $livewire */
$livewire = $component->getLivewire();
$livewire->dispatch('next-wizard-step', statePath: $statePath);
I think there must be some kind of bug, by type hinting null, the function seems to return false for if ($statePath !== $component->getStatePath()) { return; } Then it runs the rest of the logic and all my conditionally hidden fields aren't showing until the final step. If I simply return at the top, the wizard works perfectly, at least it appears to. Is this safe to do?
4 replies
FFilament
Created by tomb8091 on 8/30/2024 in #❓┊help
Wizard issue with missing $statePath
Ah! good idea, I'll try that - weird that it's so difficult to recreate the bug
4 replies
FFilament
Created by tomb8091 on 12/5/2023 in #❓┊help
Only sidebar menu loading after v3.1.11 composer update
ah!! Yep, livewire config wasn't set to auto inject the assets. The auto inject is now causing issues with the rest of my app, be good if there was a way to get filament working without auto inject turned on. But I'll mark this as solved. Thanks for your help Dennis, appreciated! 🙂
10 replies
FFilament
Created by tomb8091 on 12/5/2023 in #❓┊help
Only sidebar menu loading after v3.1.11 composer update
No description
10 replies
FFilament
Created by tomb8091 on 12/5/2023 in #❓┊help
Only sidebar menu loading after v3.1.11 composer update
Hmm, it looks like livewire and Alpine aren't loading, if I console.log window, they aren't in place. But both are loading fine on non filament pages.
10 replies
FFilament
Created by tomb8091 on 12/5/2023 in #❓┊help
Only sidebar menu loading after v3.1.11 composer update
Yep, I thought they shouldn't be there! But tried it both ways to be sure. I tried running filament:upgrade, but that didn't work. There's no custom theme.
10 replies
FFilament
Created by tomb8091 on 12/5/2023 in #❓┊help
Only sidebar menu loading after v3.1.11 composer update
Thanks Dennis, Here you go, filament views are listed as not published. I've tried publishing them and have the same problem.
10 replies