question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello everybody!

I am using your cool library and trying to update values in the GUI. Tweakpane has the function pane.refresh() (Tweakpane API). Is there a way to trigger this in use-tweaks?

Thanks a lot! Max

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
dbismutcommented, Feb 17, 2021

Hi Max, leva has indeed this feature built-in, where you can set imperatively the values of the panel.

Here’s an advanced example of how you can use leva with multiple bi-directional stores, using the usePanel api that generates a store per hook. https://codesandbox.io/s/leva-ui-45bkg

In your case you would be able to use the generic useControls hook with the function signature, like so:

// standard api
const values = useControls({ camera: [0,0,1] })

// function api
const [values, store, set] = useControls(() => ({ camera: [0,0,1] })
const onCameraMove = (newPosition) => set({ camera: newPosition })
0reactions
gsimonecommented, Feb 17, 2021

And leave feedback if you do use it 🙉

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to refresh pane in javafx - Stack Overflow
I recently have been learning JavaFX and have an issue about how to refresh the pane. In this simple program, I want the...
Read more >
4 Ways to Refresh a Page - wikiHow
1. Open the page you want to refresh. Go to the web address of the page (or click the tab for the page)...
Read more >
Page Refresh
Finally a page refresh that works. Reload any page with just a few clicks. Page refresh works on any website.
Read more >
Refresh pane from other pane in UI for ASP.NET AJAX - Telerik
Hello, I have a basic radSplitter setup, with a "navigation" pane on the left and a "content" pane on the right, divided by...
Read more >
ASPxSplitter - How to refresh pane content on the client side
I have a problem to refresh the left side Navbar menu based on the right side navigation selection. Please refer the attached screen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found