Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 BUG] tgb.toggle("{value}") does not work but tgb.toggle(value="{value}") works #1315

Closed
1 of 4 tasks
AlexandreSajus opened this issue May 24, 2024 · 2 comments
Closed
1 of 4 tasks
Labels
Gui: Back-End 🆘 Help wanted Open to participation from the community 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon

Comments

@AlexandreSajus
Copy link
Contributor

AlexandreSajus commented May 24, 2024

What went wrong? 🤔

From Stack Overflow

With this code, toggle does not move:

from taipy.gui import Gui
import taipy.gui.builder as tgb

def on_toggle(state):
    print("toggled")

value = False

with tgb.Page() as page:
    tgb.toggle("{value}", on_change=on_toggle)


if __name__ == "__main__":
    Gui(page).run(debug=True)

It works when I replace the toggle with:

tgb.toggle(value="{value}", on_change=on_toggle)

Expected Behavior

No response

Steps to Reproduce Issue

No response

Solution Proposed

No response

Screenshots

No response

Runtime Environment

No response

Browsers

No response

OS

No response

Version of Taipy

No response

Additional Context

No response

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%.
  • Create a related issue in taipy-doc for documentation and Release Notes if relevant.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@AlexandreSajus AlexandreSajus added 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed labels May 24, 2024
@jrobinAV jrobinAV added 🟧 Priority: High Must be addressed as soon 🆘 Help wanted Open to participation from the community Gui: Back-End and removed 🟨 Priority: Medium Not blocking but should be addressed 🖰 GUI Related to GUI labels May 24, 2024
@FlorianJacta
Copy link
Member

This is a known error. This should have been fixed:
#994
#1218

Could you test it and close it if it works on develop?

@AlexandreSajus
Copy link
Contributor Author

Indeed fixed in develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gui: Back-End 🆘 Help wanted Open to participation from the community 💥Malfunction Addresses an identified problem. 🟧 Priority: High Must be addressed as soon
Projects
None yet
Development

No branches or pull requests

3 participants