Dependant Select
Hello, I want to ask.
I have a filament resource called "Project".
it contains "Dependant Select" in the Teams field
then I also have a relationship manager with the name "TimesheetRelationManager".
How about when I select Teams it automatically reacts to the selection in "TimesheetRelationManager".
Thank you
17 Replies
How about when I select Teams it automatically reacts to the selection in "TimesheetRelationManager".How should it react? Isn't that more like a filter?
I mean, when I select "teams select field" in project resource, it can react selecting "members select field" in timesheetrelationmanager. You could say this is dependent select on different resources.
But where? Inside the the Edit Modal?
Okay, so you want to populate the Members field based on the current project? Can't you just select this from the Database? Or should this also work without saving?
Then you could try accessing the data via
$livewire->data['team_id']
i try with this code but not work
That's not what I told you.
$get()
is looking in the same form.
And please answer my questionsdo you mean like this ?
Yes. Does
$livewire
refer to the EditPage? Then it should contain the right data.Hmm this is maybe also the answer to my problem, what do you have to include to make this work? This:
use Livewire\Livewire;
Doesn't seem to work.
It's
Component $livewire
not Livewire $ivewire
thanks!! I clearly have to learn more about livewire, clearly I am missing some stuff π
I am sorry for late reply. I have tried it but an error appears as attached
Hm, not sure whether you can access the parent form then.
$livewire->parentElement or similar? in v3 isn't it?
actually there is something that needs to be straightened out. This menu is in relationsmanager, not in the project resource edit page
Maybe this is the same as calling the parent of the select field into the child select field of another resource
of course, it's in v3
I am saying I beleive using parentElement or similar in V3 is the correct approach over just $livewire since that returns the current element.