Trouble with updating components using ajaxPartial

Hello, on a page I have {% ajaxPartial 'passengers' %} and in that partial I have

<form
            data-request="tripDetails::onCreatePassenger"
            data-request-update="{ _self: '@' }"
            data-request-flash
            data-request-success="oc.flashMsg({text: 'Passenger created.', class: 'success'})"
        >
            {% partial __SELF__ ~ '::_passenger_fields' %}
            <button type="submit" class="btn btn-secondary btn-sm mt-3" data-attach-loading>
                Save Passenger
            </button>
        </form>

When I submit the form I get a successful flash message. The issue is I’m trying to update the component with the new data using data-request-update, but that isnt happening (I have to refresh the page to see the updates).

My onCreatePassenger method looks something like this…

public function onCreatePassenger(SavePassengerRequest $request): void
    {
        // I create the passenger here

        $this->page['passengers'] = Passenger::query()
            ->where('lead_id', $user->lead_id)
            ->orderBy('name')
            ->get();
    }

When I submit the form I get a response that indicates all is okay on the backend but its not updating on the frontend? Here is the start of the response…

Cache-Control: no-cache, private
Content-Type:  application/json
Date:          Thu, 05 Mar 2026 16:55:28 GMT

{"passengers":"
<div class=\"p-6 border-1 border-solid border-light bg-white\">
    \n    
    <div class=\"d-flex align-items-center justify-content-between border-b border-solid border-light pb-3 mb-3\">
        \n        
        <h5 class=\"m-0\">
            Passengers
            <\/h5>

If anyone has any ideas I’d appreciate it.

Hi @lewis-jump24

my guess is that the page variable passengers is sent back to the ajaxPartial itself and not its container.

So you might want to try to update the container as well with something like that

data-request-update="{ _self: '@',  'my_partial' : '#myContainerId' }"

Hope this helps