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
Trigger for ui.checkbox and ui.toggle not triggered on unselect #94
Comments
I was able to check and uncheck. Not sure why it is acting differently for you. Let me try to get a gif. |
ui.checkbox(
name="green_zone",
label="Green Zone",
value=True,
trigger=True,
),
ui.checkbox(
name="yellow_zone",
label="Yellow Zone",
value=True,
trigger=True,
), |
Interesting, will investigate further. |
Tried your code, but still not clickable: Will wait till #44 gets resolved and see then. |
@mturoci This issue seems to be unrelated to #44. I'm curious why you and @srini-x are observing different behaviors. In my case, the checkboxes are working as expected, and they do send true/false correctly to the backend. To reproduce, I ran the @srini-x, @mturoci - Can you please try the |
@lo5 Got same behavior for |
Also observed that when tweaking checkbox with
|
@lo5 I understand that |
@mturoci does the whole form re-render when a checkbox is changed? |
@lo5 |
|
The behavior you observed in #11 might also be related to the above comment. |
Correct. My point is I am not sure if it should be dirty at that point since no cards were added / deleted. Sync's round-trip to server wants to override |
For simplicity, To optimize this, it could simply modify the |
@srini-x The problem is here: https://github.com/h2oai/q-dai-performance/blob/5bf98871b6a0cf87ba4fd53f56c544a9596423d4/q_dai_performance/dashboard_ui.py#L355 As @lo5 pointed out, you should not set whole card to a page, but only |
For anyone stumbling upon this issue in future: Simply update |
Q SDK Version, OS
Q 0.3.1
OS: macOS 10.15.6
Actual behavior
When using
trigger=True
onui.checkbox
andui.toggle
, selecting an option creates trigger with the component name inq.args
. However, when an option is unselected,q.args
is empty.Expected behavior
Expected behavior is have the
q.args
with thename
of the component that is unselected and the value to beFalse
.Here is the log from my app. checking the checkbox created
green_zone
but unchecking it did not create anyargs
The text was updated successfully, but these errors were encountered: