[Feature Request] Move `refresh()` from `RootApi` to `FolderApi` ?

This issue has been tracked since 2023-03-09.

Now we can only call refresh() on the RootApi, but not on FolderApi.

const pane = new Pane({ title: 'Pane' });
const folder = pane.addFolder({ title: 'folder' });

folder.refresh(); // not work, no `refresh` method on FolderApi.
pane.refresh(); // work

This will refresh all bindings.
If the pane has many fields, it would cause performance issue.

And your RootApi#refresh implementation can safely move to FolderApi.

Now I am doing the same thing on my codebase.

import('tweakpane').then(module => {
    const { Pane, FolderApi } = module;

    if (!FolderApi.prototype.refresh) {
        FolderApi.prototype.refresh = Pane.prototype.refresh;

I think this will be useful.

cocopon wrote this answer on 2023-03-13

Implemented in #513 and it will be released in the next major version 4. Please wait for the next release...

scarletsky wrote this answer on 2023-03-13

Great ! Wait for v4. 😄

More Details About Repo
Owner Name cocopon
Repo Name tweakpane
Full Name cocopon/tweakpane
Language TypeScript
Created Date 2016-05-10
Updated Date 2023-03-17
Star Count 2603
Watcher Count 19
Fork Count 71
Issue Count 11


Issue Title Created Date Updated Date