-
Notifications
You must be signed in to change notification settings - Fork 295
View toggling But data Variable Is Not Modified #14
Comments
@gbmhunter What I might do is put in a 'data-driven' boolean flag on the top level treebeard props. That can be used when you want the |
Or maybe Its best to simplify it right down and make it completely data driven. Which is more react-ish. It would however, mean everyone has to define an onToggle callback to get simple things like toggling the drawer to work. |
@gbmhunter I have reworked treebeard to be completely data driven. I think its the best way to ensure its easy to keep extending functionality in the future. It's currently in master. Could you please try it out and see if it works well for you? Thanks! |
Hi @alexcurtis , I have attempted to pull the latest master on GitHub with the command:
I had a look at some of the files after my attempted update, and the update seemed to have worked. However the view is still toggling while I also did What's going on here? |
@gbmhunter I'm not exactly sure what happening in your project. But in the project example, if you clear out |
@gbmhunter Just thought. If you are using the master, you might need to compile down the lib before use. When I push to npm, this is automatic. But for now, whilst you test master, you will need to do this step. |
Woah, I'm running on a Windows machine and having many difficulties trying to install the dev dependencies. Many errors are being thrown when trying to run |
I am stuck in a loop with npm errors stating "Attempt to unlock , which hasn't been locked". |
@gbmhunter. I'll push this out to a npm release today. I'm quite happy with it being data-driven. But its a breaking change, so I'll bump up the version to 1.x.0. I'm in the middle of a decorator refactor, so once thats done, I'll push everything to a new release. |
@gbmhunter. I have release |
@alexcurtis works perfectly now thank you! BTW, do you have a donate button or something similar? I'm super impressed by the effort you've put into this open-source library. |
@gbmhunter Thank you for your amazing support! I've added a Pledgie donate button to the Readme. |
I commented out all code in the
onToggle
event handler (and hence the data variable does not get modified), yet the view still toggles as normal.As far as I can understand, the view is driven from the
data
variable, so the view should only toggle if the correspondingtoggled
parameter in thedata
variable changes?The text was updated successfully, but these errors were encountered: