Select Field Component State: Injecting Title along with ID
Hey all,
Wondering if this is possible at all without formatting the state with ->formatStateUsing()
I'm trying to fetch an ID from a request, which will subsequently inject the ID in the request into the Select Component. It's working, I have the correct ID, but I'm wondering if something like this is possbile:
Especially this line
I don't think it's possible? I've also tried other variants like
Anyone have any suggestions or should I just use formatStateUsing()?
Wondering if this is possible at all without formatting the state with ->formatStateUsing()
I'm trying to fetch an ID from a request, which will subsequently inject the ID in the request into the Select Component. It's working, I have the correct ID, but I'm wondering if something like this is possbile:
Especially this line
$component->state([$toplist['id'],$toplist['title']]);I don't think it's possible? I've also tried other variants like
$component->state(['id' => $toplist['id'],'title' => $toplist['title']]);Anyone have any suggestions or should I just use formatStateUsing()?