Disable socket game object without dropping interactable?

I’m making a backpack system using socket interactors, and I want to have multiple pages of the backpack. Basically TWD S&S’s backpack system.

I have 3 different parent objects each with 9 socket interactors as children. Going to the next page uses SetActive to turn off the current page and turn on the next one, however this also disconnects all the items that were in the old page because those items aren’t parented to the socket and don’t get disabled when the socket does.

Anyone know how I can fix this?

I’ve tried doing something like this:

    protected override void OnDisable()
    {
        foreach ( var interactable in interactablesSelected )
        {
            interactable.transform.gameObject.SetActive(false);    
        }

        //base.OnDisable();
    }

    protected override void OnEnable()
    {
        foreach ( var interactable in interactablesSelected )
        {
            interactable.transform.gameObject.SetActive(true);
        }

        base.OnEnable();
    }

on a script that inherits from XRSocketInteractor. But this doesn’t work and I feel like if I tried to make it work, like disabling meshes and colliders only instead of the object, it’d get really bloated really fast and wouldn’t work with every item. Any easier ways?

An approach like this seems to be working so far. Still need to work through some stuff but I think I have the issue solved.

    protected override void OnSelectEntered(SelectEnterEventArgs args)
    {
        base.OnSelectEntered(args);

        // Get the interactable object
        XRGrabInteractable interactable = args.interactableObject as XRGrabInteractable;

        // Parent the interactable to the socket
        if (interactable != null)
        {
            attachTransform.localScale = transform.TransformVector(interactable.transform.localScale);
            interactable.transform.SetParent(attachTransform, true);
        }
    }

    protected override void OnSelectExited(SelectExitEventArgs args)
    {
        base.OnSelectExited(args);

        // Get the interactable object
        XRGrabInteractable interactable = args.interactableObject as XRGrabInteractable;

        // Unparent the interactable when it is removed from the socket
        if (interactable != null)
        {
            interactable.transform.SetParent(null, true);
        }
    }