kitschpatrol / svelte-tweakpane-ui

A Svelte component library wrapping UI elements from Tweakpane, plus some additional functionality for convenience and flexibility.
https:///kitschpatrol.com/svelte-tweakpane-ui
MIT License
105 stars 3 forks source link

AutoObject fails for nested folder #10

Closed TravisThomp closed 3 months ago

TravisThomp commented 3 months ago

When using an object such as

const object = {
    aFolder: {
        aSetting: 0,
        bFolder: {
            bSetting: 0,
            cFolder: {
                cSetting: 0,
            },
        },
    },
}

The Panel will only display the slider for the A setting and then show an empty B folder

image

TravisThomp commented 3 months ago

Seems like my svelte was just bugging... Works now :D

kitschpatrol commented 3 months ago

Ok great, it's working ok on my end. (Assuming let instead of const.)

Screenshot 2024-06-02 at 10 58 17 of Chromium - httplocalhost5174TestAutoObjectNesting svelte@2x

In development builds, I've found that sometimes HMR can start to get weird, and a hard refresh takes care of it.

Feel free to reopen if you run into this again.