#Wizard 1st step, not passing $get data to 2nd step made of Livewire component for filtering rows

14 messages · Page 1 of 1 (latest)

fallow windBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

weary veldt
#

Wizard 1st step, not passing $get data to 2nd step made of Livewire component for filtering rows

zinc kestrel
#

So $get data is passed between steps... but the problem is each tab is a container and an element in it's own. So you need to get the steps by traversing out, then into the next step.

#

so dd:

$get('../../')

would or should show the data structure.

weary veldt
#

$get is getting correctly the updated values of the Select fields of the step 1. But it seems that the livewire component is sleeping and it's not getting the data passed from the closure.

#

and if I dd the $get('filter_facility') etc. in the closure, of Livewire::make, I can see the values

weary veldt
zinc kestrel
#

try a few, it'll be in there somewhere.

dd($get('../'))

or

../../../

#

It looks like you have some custom / bespoke schema/data going on here.

Have you mounted the data on fill?

weary veldt
#

The table is including all the rows because the filters are not being passed.

zinc kestrel
#

You are not filling the form by the looks of it.

#
    public function mount($filterFacility = [], $filterRoles = [], $filterCompany = [], $filterNewsletter = [])
    {
        $this->filterFacility = $filterFacility;
        $this->filterRoles = $filterRoles;
        $this->filterCompany = $filterCompany;
        $this->filterNewsletter = $filterNewsletter;
    }

to

    public function mount($filterFacility = [], $filterRoles = [], $filterCompany = [], $filterNewsletter = [])
    {
        $this->filterFacility = $filterFacility;
        $this->filterRoles = $filterRoles;
        $this->filterCompany = $filterCompany;
        $this->filterNewsletter = $filterNewsletter;
        $this->form->fill([]);
    }
weary veldt