how to reload component info from Attributes?

  • uunicode-1341496687063203841

    unicodes

    25 days ago

    I have two components at the same level (like Cities and Countries). I need to refresh the Cities content based on the selected Country. Cities and Countries are two separate components with external variables (passing information using Attributes and Events to facilitate usage across different pages).

    Even when selecting a new Country and deleting the selectedCity variable content, the visible value doesn't change. Even though I have set "On Attribute Change" inside the component to pass the value from the Attribute to the internal variable again, it still doesn't update. However, if I hide and show the component, it works; otherwise, it doesn’t.

    I'm more than 100% sure that the value is deleted as expected, but I can't understand why it isn't taking the new value from the input again.
    1341496689634181221-Screenshot_2025-02-18_at_21.47.21.png
    1341496688627421355-Screenshot_2025-02-18_at_21.43.35.png
    1341496687935623209-Screenshot_2025-02-18_at_21.43.14.png
  • lucasg-1341498059904909453

    Lucas G

    25 days ago

    Does it work on frontend?
  • Is it just the context not updating inside the editor or does it not work at all
  • uunicode-1341498722919518350

    unicodes

    25 days ago

    In the editor and in browser it doesn't work. The values are editing right in the variables, but doesn't want to update visually. Only if refreshing the component (like opening a new page and coming back on the previous with that component).
  • lucasg-1341520576514228294

    Lucas G

    24 days ago

    Is it possible to see the project/component
  • uunicode-1341578503321026571

    unicodes

    24 days ago

    Do you mean to export it as web component and sharing it or making a video?
  • lucasg-1341624039705411688

    Lucas G

    24 days ago

    Like a link to the project, but a video with more info would work as well
  • We would need to see how it's all setup
  • uunicode-1343978852589764701

    unicodes

    18 days ago

    Hi Lucas, I continue to get this issue so I come back with a new case more simple to explain.
    1343978852212281557-Screenshot_2025-02-25_at_18.11.34.png
  • I have a component and I'm passing information in using attributes. The variable selected get's the attribute value and the <p> shows the content of the variable.
  • My issue is that this does not shows the information in the <p> tag if not reloading the component itself.
  • uunicode-1343979662811861023

    unicodes

    18 days ago

    I can use the event "on attribute change", but it should get the value directly considering the variable selected has already this connection with the attribute.
  • uunicode-1343980166711607377

    unicodes

    18 days ago

    This is the path of how the information is passed.
    1343980166468079627-Screenshot_2025-02-25_at_18.17.01.png
  • uunicode-1343980456210857995

    unicodes

    18 days ago

    The event edit click add information in a variable. If the information exist then is true in the switch which turns the component (editor) on.
  • The editor get the value from the variable agreement, and pass the information to the child intended for using attributes.

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.