Appying controls and layout to modal

I have such a modal implementation and it works very well. I want to apply some controls for example for scrolling but I cant figure it out how to.

# Callback that will open the modal when the button is clicked
def modal_callback2(event):
    
    # modal content here

    # Add content to the modal area
    template.modal[0].controls(jslink=True)
    template.modal[0].clear()
    template.modal[0].append(chat_interface)
    template.open_modal()

# Link the button to the callback and append it to the sidebar
modal_btn.on_click(modal_callback2)

how can I set Scroll to both-auto?