Component attributes not updating in editor...

  • mdxwired-1300891005561868299

    mdxwired

    5 months ago

    Hey all. Has there been a recent change to how/when the editor updates component attributes when the underlying linked variable or formula changes?
    My page worked perfectly in the editor yesterday and still works perfectly in 'preview' mode, but is now very erratic within the editor itself.
    I have cleared all site data (browser cache, cookies, etc...) and everything else that I can think of...
    When I pause the 'test' run and click on the attribute, the contents say that they are what they should be, they just do not pass to the component or display correctly on the page.

    Thanks in advance!!
  • andreasmoller-1300891252606107698

    Andreas Møller

    5 months ago

    No not we are not aware of any changes that would cause this
  • jacobkofoed-1300891635877416962

    Jacob Kofoed

    5 months ago

    Are there any errors in the browser console? (f12)
  • mdxwired-1300891995027406971

    mdxwired

    5 months ago

    Nope. All clear.
  • mdxwired-1300892847662174240

    mdxwired

    5 months ago

    Ooop! Hold that thought. Found a 'buried' issue... I'm checking...
  • mdxwired-1300894657961791648

    mdxwired

    5 months ago

    OK. Error unrelated but fixed just in case. Problem still exists.
    Further interesting diagnostic... everything updates instantly and correctly if I make any change to any other attribute of any component on the page (includng the component with the issue). That seems to force an update of ALL components on the page.
  • needtheanswers-1300896658640339036

    needtheanswers

    5 months ago

    +1 I have the same issue
  • I need to manually refresh the page in order for my component attributes to update
  • mdxwired-1300899140535975956

    mdxwired

    5 months ago

    Interesting... for me that does not work. Some attributes display the correct information (including many that are pulling from an API on load), and others will only refresh correctly if I change some other attribute.
  • Also have tried it in two different browsers... Chrome and Opera.
  • jacobkofoed-1300899544522948761

    Jacob Kofoed

    5 months ago

    Can you link the project or make a short screenshot/video so I'm 100% sure on the issue. I have not been able to recreate it thus far.
  • mdxwired-1300900325871587338

    mdxwired

    5 months ago

    @Jacob Kofoed I will add you to the project... hang on.
  • mdxwired-1300900972612030546

    mdxwired

    5 months ago

    @Jacob Kofoed is it just jacob?
  • jacobkofoed-1300901041172119552

    Jacob Kofoed

    5 months ago

    Yup 👍
  • mdxwired-1300901159363543111

    mdxwired

    5 months ago

    You will need to use the login page first to estalish auth for the API calls.
  • mdxwired-1300902125533921301

    mdxwired

    5 months ago

    Hold please... trying to change a password in Supabase. I foolishly used a common one for me. Duh.
  • needtheanswers-1301179309808943237

    needtheanswers

    5 months ago

    @Jacob Kofoed In my case I´m trying do delete cart items. The calculations and the button are both components, fed with the same data. As you can see the button is updating as soon as the request finishes but as for the calculations I would need to refresh the page manually
  • needtheanswers-1301179589900374068

    needtheanswers

    5 months ago

    @mdxwired Any news on this? Were you guys able to solve this?
  • jacobkofoed-1301180122237505576

    Jacob Kofoed

    5 months ago

    I think I would need to see the project to help you with the specific issue. Do you have a link to it that I can see? For @mdxwired we tried some different approaches. I'm not sure we know for sure, but the issue might have been related to how APIs are not guarenteed to be loaded server side in the editor vs. preview.
  • needtheanswers-1301180681472442498

    needtheanswers

    5 months ago

    Gonna send you a DM right away. And thank you for the information regarding @mdxwired 's project
  • needtheanswers-1301186828740591617

    needtheanswers

    5 months ago

    So in my case the problem was that I was using a variable to set the lines of the calculations when I should have used a formula to do so instead. "Variables with a default value are only updated the first time, but will not update their values automatically when attributes change" Thank you @Jacob Kofoed for explaining this to me and solving my issue.
    💪1
    👍1
  • mdxwired-1301203460469030952

    mdxwired

    5 months ago

    Sorry. Yes. I needed to use internal component variables because one cannot directly change attributes from within, and I did not want my components 'bouncing' in and out with every click. That said, a reasonably clever use of the "Attribute Changed" event allowed me to 'catch' the delayed update of the API-fed attribute that was lagging behind. I simply grab the initial state of all attributes on the way in the first time, set my internal variable(s) accordingly, and then use "Attribute Changed" to check to see what changed and decide if I need to update the variable first set above. Works every time now.!!! 😎
    💪1
  • mdxwired-1301204017531322369

    mdxwired

    5 months ago

    The 'need' for internal variables described above is due to the interdependence of some of my internal mechansisms (things that change or update based upon the changing states of other things).

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.