Select field using search populate another field.

I have a select field that populates the options via an external API request:

Forms\Components\Select::make('ticket_number')
    ->searchable()
    ->getSearchResultsUsing(fn (string $search): array => \App\Models\Ticket::apiTickets($search))
    ->selectablePlaceholder(false)
    ->searchingMessage('Searching Tickets...')
    ->native(false)
    ->live(),

Forms\Components\TextInput::make('ticket_title')->readOnly(),


How can I pass the selected result over to the TextInput field? I couldn't figure this out using afterStateUpdated with the getSearchResultsUsing method on the original field.
Was this page helpful?