Kitware / trame-vuetify

trame-vuetify brings Vuetify UI Material Components into trame
MIT License
9 stars 3 forks source link

VTreeview open_all prop not working #10

Closed MattTheCuber closed 1 month ago

MattTheCuber commented 1 month ago

Vuetify demo

https://play.vuetifyjs.com/#eNq1Vk1z2jAQ/SsaX0hmsFMbEhoPYYa2l17aS6c9AAchLYNaWXJl2STD+L9XwriWg/lIm5xgpX1vrd19K8223jRNgyIHL/bGGpKUYw2TuUBoXPhaARQMNtZEKGZmP3uYe7vfuVetWsMvMM/B7tB6WaYgfMy5tSbjm4bLcI9vnEDGzIhiqd4FhcdUKo0orHDONdpWZBRrHKOra/QwQVf7tSpyFqNZbaPafb9NYxT23RXNNIcY9cyJOSNYMykyFPdaPmTNOFUgWrw77h1h1P/L8hFzEBQrFCOcpj1UtnhqwMABrJVM4LT7sHH/ActMS5V0AxaO5e4cpOC2MwWfJMkTEPoF52+bFfnds0M0AUxHabZ6ek5/MkRnmDrU6IDHDZcp0hXqbLgm8++bzDNB4dGkXWeHZWqD7hvQUkqdaYXTk0C3bF3l6/Y66JWuWoTvjhYjMVJTDPPo9coRtqX1+vUIHakV/lKLiwoSOnorfIIVvQzm6K7wN6YB5ObN63ixhMNjGt4ILjF96QwL75rDfiVaLsHOsJSujg2lcNQAvsgCkvMIR03fcjPFTPMZxFon/J8HWXjfmYXvjIL8zzEWHZdO/fUHEc5Lp6IOm0x8wBkjiOMnmdvBi5J02N1fe6ijgCktsCBAkQayFux3DpcQOGKYco7w0gS2l4mBUqa6oGcnT0XsyOWz0Erab5HFsW6Ibp1LUIoVmJQRQMwiaU7sPWwvuYJd1hv1anm9+1PaB8X+CeH1Pc7Eryz4mUlhXjTbuUcy81SJZ4vS7LHEvi78BKeOQ7VonbZl6ZV9bxAMg2hk3AfBKIi8vlY5LP4AClpAPw==

Trame demo

import trame.widgets.vuetify3 as v3
from trame.app import get_server
from trame.ui.vuetify3 import VAppLayout

server = get_server(client_type="vue3")

v3.enable_lab()

tree_list = [
    {
        "title": "public",
        "children": [
            {
                "title": "static",
                "children": [
                    {
                        "title": "logo.png",
                        "file": "png",
                    },
                ],
            },
            {
                "title": "favicon.ico",
                "file": "png",
            },
            {
                "title": "index.html",
                "file": "html",
            },
        ],
    },
    {
        "title": ".gitignore",
        "file": "txt",
    },
]

with VAppLayout(server) as layout:
    with layout:
        v3.VTreeview(items=("tree_list", tree_list), open_all=True)

if __name__ == "__main__":
    server.start()
MattTheCuber commented 1 month ago

Turns out you need to add the item_value option to make open_all work.