You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently, using rx.cond with literal string values for the tag argument in rx.icon raises issues with safety or functionality. This limits the ability to dynamically assign icons based on a conditional state in a clear and concise manner.
Expected behavior
It should be possible to use rx.cond with literal values for the tag argument safely and without requiring workarounds. The expected functionality would dynamically resolve the tag value based on the conditional expression.
Specifics (please complete the following information):
Python Version: 3.13.1
Reflex Version:0.6.7
OS: WSL2
Additional context
A potential workaround for this issue is to wrap the rx.icon calls within the rx.cond as follows:
Describe the bug
Currently, using rx.cond with literal string values for the tag argument in rx.icon raises issues with safety or functionality. This limits the ability to dynamically assign icons based on a conditional state in a clear and concise manner.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should be possible to use rx.cond with literal values for the tag argument safely and without requiring workarounds. The expected functionality would dynamically resolve the tag value based on the conditional expression.
Specifics (please complete the following information):
Additional context
A potential workaround for this issue is to wrap the rx.icon calls within the rx.cond as follows:
This workaround avoids the direct use of literal values with rx.cond, but a built-in solution would streamline development and improve code clarity.
The text was updated successfully, but these errors were encountered: